Here are a few Lync PowerShell commands that I use daily. (Since there's not as many as the Exchange commands I previously posted, I've just listed them out here...but leave a comment if you want them zipped and shared out.)
Create Lync User Account
**Note**
You will need an existing AD account for the specified user account, and the SIP Address is usually the email address unless you're installation is configured differently; if so you'll need to specify that.
--To Create Lync User, run:
Enable-CsUser "User Name" -RegistrarPool "poolname.domain.com" -SipAddressType EmailAddress
Disable/Re-enable Lync User Account
You can disable a Lync user account without losing the Lync Server settings that you configured for the user account
--To Disable a Lync account, run:
Set-CsUser -Identity "User Name" -Enabled $False
--To Re-enable a Lync account, run:
Set-CsUser -Identity "User Name" -Enabled $True
Force Lync Replication and Check Replication Status
After any major changes such as routes or policy changes, its best to force a replication.
**Note**
Invoking replication does not return any values, so you'll need to check replication status like below.
--To Force CMS Replication, run:
Invoke-CsManagementStoreReplication
--To Check CMS replication health, run:
Get-CsManagementStoreReplicationStatus
If you have a large topology, run:
Get-CsManagementStoreReplicationStatus | Where {$_.UpToDate -ne $True}
Remove a Lync User Account
-- To remove a Lync account, run:
Disable-CsUser -Identity "User Name"
Revoke a Lync User Certificate
**Note**
If you allow users to save their username/password, they will still be able to use Lync even if you disable their AD account.
--To Revoke a User Certificate, run:
Revoke-CsClientCertificate "User Name"
No comments:
Post a Comment