Saturday, February 21, 2015

Powershell Scripts for Lync 2103


In this Blog we see few Power shell scripts/ Lync Management scripts for day to day Jobs

To get the Lync Enabled users.

Get-CsUser -OnLyncServer -Filter {Enabled -eq $true} | Select-Object SipAddress, SamAccountName, DisplayName, LineURI, Enabled, EnterpriseVoiceEnabled, ConferencingPolicy | Export-CSV -Path C:\Output\Lynceabled users.txt


To Add an Federated Domain using Command.

New-CsAllowedDomain -Identity "Contoso.com" -ProxyFqdn "sip.contoso.com" -MarkForMonitoring $True -Comment "you can put comments here how requested"

To get Disabled AD accounts for Lync users

Get-CsAdUser | ?{$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled -eq $true} | ft Name,Enabled,SipAddress -auto | Tee-Object -FilePath C:\Output\DisabledADaccounts.txt


Any Comments are Welcome :) 

No comments:

Post a Comment