Tuesday, December 15, 2015

Finding AD Disabled Accounts Who are Still Lync Enabled

Finding AD Disabled Accounts Who are Still Lync Enabled

Get-CsAdUser -ResultSize Unlimited | Where-Object {$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled -eq $true} | Format-TableName,Enabled,SipAddress -auto


Get-CsAdUser -Filter {UserAccountControl -eq “AccountDisabled, NormalAccount” -and Enabled -eq $true} | Set-CsUser -Enabled $false

No comments:

Post a Comment