Windows Vista和局域网聊天的计算机
檢查運行Windows Vista和局域網聊天的計算機引導配置文件通常可以為用戶解決引導有關的問題,提供很多有價值的信息。類似引導分區、引導目錄,以及Windows目錄等信息往往都對排除故障很有用,大多數情況下通過VBS腳本獲取這些信息需要花費很多時間。
局域網聊天-www.freeeim.com
如果Windows Vista和Windows Server 2008無法正常啟動,則可以檢查引導配置文件是否出現錯誤;另外可以檢查啟動服務及其依存性。Windows中的一些服務依賴于其他服務、系統驅動程序和組件的加載順序。如果系統組件被停止或運行不正常,則依賴于它的服務會受到影響。
創建名為“DisplayBootConfig.ps1”腳本讀取引導配置,其代碼如下:
param($computer="localhost", [switch]$help)
function funHelp()
{
$helpText=@"
DESCRIPTION:
NAME: DisplayBootConfig.ps1
Displays a boot up configuration of a Windows system
PARAMETERS:
-computer The name of the computer
-help prints help file
SYNTAX:
DisplayBootConfig.ps1 -computer WebServer
Displays boot up configuration of a computer named WebServer
DisplayBootConfig.ps1
Displays boot up configuration on local computer
DisplayBootConfig.ps1 -help
Displays the help topic for the script
"@
$helpText
exit
}
if($help){ "Obtaining help ..." ; funhelp }
$wmi = Get-WmiObject -Class win32_BootConfiguration `
-computername $computer
format-list -InputObject $wmi [a-z]*
該腳本使用param語句定義了$computer和$help變量,前者的默認值為localhost。設置-help參數為switch,即在使用該參數時不需要提供額外信息,并且使用Get-WmiObject cmdlet從Win32_BootConfiguration WMI類中獲取信息。如果需要,可以將$computer變量中的值提供給-computername參數。這樣可以通過Get-WmiObject cmdlet連接到遠程計算機,最終將返回的management對象傳遞給Format-List cmdlet。使用范圍運算符(range operator)[a-z]*選擇字符開頭的屬性,以過濾報告中的所有系統屬性(因為系統屬性均以下畫線開頭)。
該腳本的執行結果如圖1所示。
?
Read more: PowerShell2.0之Windows排錯(一)啟動故障排錯 - 天行健@中國元素 - 博客園 http://www.cnblogs.com/fuhj02/archive/2011/01/16/1937007.html#ixzz1BDVc3100
總結
以上是生活随笔為你收集整理的Windows Vista和局域网聊天的计算机的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我所理解的离散傅里叶变换_DFT
- 下一篇: Windows Mobile 数独游戏及