列出当前域中的所有活动机器帐户
$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
}
foreach
在此之后我正在做一个,$computers
但我想要一个排除列表..最好像这样格式化
computer1
server4
computet4
但是,怎么做?
来自挪威的问候!