3
我試圖運行下面的腳本,但是當我做我得到PowerShell的格式是否
意外令牌「-PrimaryUserAddress」在表達式或語句
我怎樣才能解決這個問題?
$users = Get-ADUser "joerod" -Properties *|Select-Object SamAccountName, msRTCSIP-PrimaryUserAddress
ForEach ($user in $users) {
if($user.msRTCSIP-PrimaryUserAddress -ne 0){
Write-Host "Removing $($user.samaccountname) from OCS"
}
}
完美,謝謝! – JoeRod