Import-Module activedirectory
Import-Module lync
Get-csUser | where {$_.EnterpriseVoiceEnabled -eq 'true'} | foreach{
$u = get-aduser -Properties telephoneNumber -Identity $_.Identity.tostring()
If ($u -ne $null)
{
#strip out all non numerical values
$rawdigits = $u.telephonenumber -replace '\.',''
$rawdigits = $rawdigits -replace '\s',''
$rawdigits = $rawdigits -replace '\(',''
$rawdigits = $rawdigits -replace '\)',''
$rawdigits = $rawdigits -replace '-',''
$rawdigits = $rawdigits.trim()
$LyncLineuri = $_.lineuri
$LyncLineuri = $LyncLineuri -replace 'tel:\+1',''
If($rawdigits -eq $LyncLineuri)
{
write-host $u.distinguishedname " telephoneNumber attribute - " $rawdigits " matches the LineUri " $LyncLineuri
}
else
{
write-host $u.distinguishedname " telephoneNumber attribute - " $rawdigits " does not match the LineUri " $LyncLineuri
}
}
else
{
write-host $_.Identity.tostring() " no user match found"
}
}
A very nice post, the unified communication solutions
ReplyDeleteis very must in nowdays and this type of communication companies make the services better. One of same kind or Conferencing is Global UC . You Should go through it and check its services.