views:

36

answers:

0

Hi, I was hoping somebody could help me a little with this. I'm in need of setting SIP addresses for all users where this address is not set. And the address is supposed to be the same as their e-mail address. How can I do this?

So far, I know I can run get-mailbox to get all mailboxes. But I probably need to store this in a variable, store all users e-mail adresses in a variable and then set the sip address based on the e-mail address. Could someone help me get started? :)

Edit:

I've found this snippet:

Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-ArchivingEnabled'=0 }
Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-FederationEnabled'=$true }
Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-InternetAccessEnabled'=$true }
Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-OptionFlags'=257 }
Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-PrimaryHomeServer'=$serverpool }
Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-PrimaryUserAddress'=("sip:" + $Fullname + "@ourdomain.com").ToString() }
Get-QADUser $Fullname | set-qaduser -oa @{'msRTCSIP-UserEnabled'=$true }

But how can I run this only for users where msRTCSIP-PrimaryUserAddress is Nothing?