Lync/Skype服务器常用Powershell命令汇总
  0k3VQiyWjK4p 2023年11月02日 33 0
  1. 查看用户路由组信息
Get-CsUser
sip:user@contoso.com | %{$strRoutingGroup =
$_.UserRoutingGroupID.ToString() -replace "-","";Write-Host
$strRoutingGroup}
  1. 查看前端服务器承载的所有路由组
Get-CsPoolFabricState -PoolFqdn skypepool.contoso.com -Type routing -Verbose
  1. 查看UpgradeDomain信息
(Get-CsPoolUpgradeReadinessState).upgradedomains
  1. 查看用户SIP以及SMTP地址
Get-CsUser user | select -ExpandProperty proxyaddresses
  1. 循环浏览所有启用Lync的用户,并查看他们的代理地址中是否有SIP值
$i=0;Get-CSUser
| %{ $strSam=$_.SamAccountName; $strSip=$_.SipAddress; $strName=$_.Name;$i++;
 If
((get-aduser -identity $strSam -properties proxyaddresses  | select
proxyaddresses -ExpandProperty proxyaddresses | where {$_ -match
"sip:"}).Count -ne 1) {  
  Write-host
"WARNING: $i - $strSam - $strName - $strSip" -foregroundcolor DarkRed
 } 
}
  1. 查找AD中未启用Lync的用户
Get-CSUser -filter
{enabled -eq $false} | %{$strSam=$_.SamAccountName;Get-ADuser -filter
{SamAccountName -eq $strSam} | where {$_.Enabled -ne $false}}
  1. 检查ProxyAddresses属性中没有sip项的用户
$i=0;Get-CSUser
| %{ $strSam=$_.SamAccountName; $strSip=$_.SipAddress; $strName=$_.Name;$i++;
 If
((get-aduser -identity $strSam -properties proxyaddresses  | select
proxyaddresses -ExpandProperty proxyaddresses | where {$_ -match
"sip:"}).Count -ne 1) {  
  Write-host
"WARNING: $i - $strSam - $strName - $strSip" -foregroundcolor DarkRed
 } 
}
  1. 检查是否使用了5061、443或3478端口,然后记录到test.log
while
($true){netstat -ano | findstr "5061 443 3478"|tee -a test.log;sleep
5;cls}
  1. 检查安装的Lync/Skype服务器版本
Get-WmiObject -query 'select * from win32_product' | where {$_.name
-like "Microsoft Lync Server*" -or $_.name -like "Skype for
Business*"}
  1. 在AD中查找名称类似Lync的所有服务器,然后列出开启了data collector名为“Lync性能监视”的服务器。
Get-ADComputer
-filter {name -like "*lync*"} | %{ $strServer
=$_.DNSHostName;write-host $strServer;$intCount=(logman -s $strServer|where {$_
-match "Lync Performance Monitoring"}).Count;($intCount -eq 1)}


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  71brNztFXeFh   2023年11月05日   45   0   0 WindowsPowershell
0k3VQiyWjK4p