Hello Friends,
I need a powershell script to copy mobilephone attribute to telephone attribute.
Scenario is below:
I have Group "Test1" , I need to copy mobilephone attribute to telephone attribute of all the uses in this Group.
I have created the script but its not giving desired result
"Get-QADGroup "test1"|ForEach-Object{Get-QADGroupMember$_.samaccountname}|selectsamaccountname,mobilephone | export-csvD:\test1.csv
Import-Csv "D:\test1.csv"|%{Get-QADUSer$_.Samaccountname | Set-QADUser-ObjectAttributes@{telephonenumber=$_.mobilephone}}"
My observation:
1.while I exporting the attribute , i am not getting proper telephone format in CSV which is "+919999XXX1111"
2. If Telephonenumber attribute of a user is allready filled , it does not update the attribute. it only update the attribute if it is blank
Plase help to resolve it.
this is kind of urgent , thank you all in advance