Welcome to TechNet Blogs Sign in | Join | Help

Karsten Palmvig's blog

Notes from the field on Unified Communications...
How To: Telephony enabling users - continued

It turned out to be significantly easier to find users without an assigned  LineURI than I expected.  Thanks to Nick Smith for pointing me in the right direction when answering something else. :o)

The Powershell script takes no parameters and will display the primary SIP URI for all OCS enabled users without a phone number (or LineURI). The count displayed at the end is written to the host so it won’t show in the file if you redirect.

$OCSUsers = Get-WmiObject -Query "Select * from MSFT_SIPESUserSetting where LineURI IS NULL"
$i=0
foreach ($OCSUser in $OCSUsers) {
  $OCSuser.PrimaryURI
  $i++
  }
Write-Host $i OCS enabled users without LineURI

The output will be correctly formatted for use with OCSAssignTelUri.wsf

Happy enabling…

Posted: Monday, July 20, 2009 5:49 PM by kpalmvig
Filed under: , ,

Comments

No Comments

Anonymous comments are disabled
Page view tracker