This Page Contains a list of Scripts and one-liners for Lync. Some are mine, the rest have the source credited. If you have something useful to add please feel free to send it to me and I’ll add it to the list. If, for whatever reason, you don’t want your script listed here, let me know and I will remove it.
Note: I have not tested these scripts, and do not take responsibility for them, always test and use at your own risk.
|
Name |
Description |
Source |
Download |
|
Update-Snom300Firmware.ps1 |
Update a Snom 300 phone’s firmware using HTTP Post, more details here |
Tom Arbuthnot |
|
|
Reboot-SnomM9_0.2.ps1 |
Uses HTTP Post to log into and reboot a series of Snom M9 phones from a CSV containing IP addresses. Used due to a memory leak on the M9 firmware |
Tom Arbuthnot |
|
|
Get-CsUserConnectionInfo.ps1 |
Function to find out which servers the user is associated with and the preferred order that the user will connect to them. More here |
Pat Richard |
|
|
Set-Lync2010Features.ps1 |
Automated Server prereq’s PowerShell script for Lync Server 2010 |
||
|
Get-CsConnections.ps1 |
See user connections, client versions, load balancing in Lync 2010 |
Pat Richard |
Lync PowerShell One-liners
You can do a surprising amount in PowerShell with one line. Even if you can’t find exactly what you are looking for. Also I’ve been a bit liberal with “one-liner”, it’s really anything short enough to fit in the text box.
|
Command |
Description |
Source |
|
(get-csuser -OnLyncServer -Filter {EnterpriseVoiceEnabled -eq $true}).count |
Count the Number of Voice Enabled Lync Users in a Lync Deployment |
|
|
$photo = [byte[]](Get-Content C:\rhouston.jpg -Encoding byte) |
This example uses AD PowerShell to import a photo named rhouston.jpg for a user named rhouston
|
|
|
Get-CsAdUser | ?{$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled -eq $true} | ft Name,Enabled,SipAddress -auto |
Finds AD disabled accounts who are still Lync enabled |
|
|
Get-CsAdUser | ?{$_.UserAccountControl -match "AccountDisabled" -and $_.Enabled -eq$true} | Disable-CsUser |
Disable Users for Lync who are already disabled in AD |
|
|
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0" -Name "NtlmMinClientSec" –Value 0 Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0" -Name "NtlmMinServerSec" -Value 0 |
Set NTLM Security to No Minimum |
|
|
Import-Module ServerManager |
Add the PowerShell ISE to Server 2008 R2 |
Tom Arbuthnot |
