Reference for PowerShell and HTML Scripting
https://sqlpowershell.wordpress.com/2013/09/17/powershell-script-to-monitor-a-service-on-a-group-of-servers-html-formatted-email-output/
Working as Messaging Specialist
Get
-CsAdUser
-ResultSize
Unlimited |
Where-Object
{$_.UserAccountControl
-match
"AccountDisabled"
-and
$_.Enabled
-eq
$true
} |
Format-Table
Name,Enabled,SipAddress
-auto
Get-CsAdUser -Filter {UserAccountControl -eq “AccountDisabled, NormalAccount” -and Enabled -eq $true} | Set-CsUser -Enabled $false