列出所有活動machineaccounts當前域
$ComputerScan = @(Get-QADComputer -sizelimit $sizelimit -IncludedProperties LastLogonTimeStamp -WarningAction SilentlyContinue -Inactive:$false -OSName $computerFilter | where {$_.AccountIsDisabled -eq $false})
# Create list of computers
ForEach ($Computer in $ComputerScan){
$compObj = New-Object PsObject -Property @{
Computer = $computer
Credentials = $credentials
Domain = $domain
}
$computers += $compObj
}
我這個後上做$computers
一個foreach
,但我想有一個exclusionlist .. 最好格式化如下排除的結果列表(從返回GET-QADComputer)
computer1
server4
computet4
但是,怎麼樣?
來自挪威的問候!
謝謝謝! – Sune 2012-05-09 10:46:48