0

誰か使い方教えてください

***Get-QADComputer -LdapFilter "(operatingsystem=*server*)"***

以下の私のスクリプトで。(get-qadcomputerビットで失敗するだけのテキストファイルで動作させることができます)

***function inventory {
PROCESS {
$os = gwmi win32_operatingsystem -comp $_
$cs = gwmi win32_computersystem -comp $_
$obj = new-object psobject
$obj | add-member noteproperty Name $os.csname
$obj | add-member noteproperty RebootDate $os.ConvertToDateTime($os.LastBootUpTime)
$obj | add-member noteproperty Manufacturer $cs.manufacturer
$obj | add-member noteproperty Model $cs.model
$obj | add-member noteproperty Operating_System $os.caption
$obj | add-member noteproperty Architecture $os.OSArchitecture
$obj | add-member noteproperty Service_Pack $os.ServicePackMajorVersion
write-output $obj
}
}
gc C:\scripts\lastreboot\syn_pc.txt -ErrorAction SilentlyContinue | inventory | Export-Csv c:\scripts\lastreboot\inventory2.csv***
4

1 に答える 1