Ok so after reading more carefully what you are trying to do here is a script that should set the sip address. You may also need to set other info like FederationEnabled, OptionFlags, PrimaryHomeServer, InternetAccessEnabled, etc... Not sure in your environment what populates automagically. Your request was to set the SIP address so here it is:
Get-QADGroupMember 'Domain Users' `
-SearchAttributes @{'msRTCSIP-UserEnabled'=$true} `
-type 'User' `
-Credential $admincreds `
-IncludedProperties msRTCSIP-UserEnabled,mail,msRTCSIP-PrimaryUserAddress,msRTCSIP-PrimaryHomeServer | %{
$primehost = "PrimaryHost"
$tempsip = $_.mail.split('@')
$sip = "sip:$($tempsip[0])@$primehost.$($tempsip[1])"
Set-QADUser -Identity $_.distinguishedName -Credential $admincreds -ObjectAttributes @{'msRTCSIP-PrimaryUserAddress' = $sip}
}
I didn't actually try setting anything in my environment so the last line is my 'guessing' what should happen; you may need to tweak it.