I have a script with about 7500 users. The headers are DisplayName and PhoneNumber in the csv. I need to read the csv and then update the msrtcsip-line Active Directory attribute for each user. Sadly I haven't used ActiveRoles cmdlets hardly at all so it feels a little humbling to not know how to approach this.
I am thinking something like this?
Import-CSV filename.csv
Get-QADUser $ | Foreach-Object{
$user = $_.DisplayName
$phone = $_.PhoneNumber
Set-QADuser -Identity $user $_ -ObjectAttributes @{'msRTCSIP-Line'="tel=$phone"}
}
Can someone help me out please? Need to run this and then customize it a bit.
Does this look right?
Import-Csv data.csv | ForEach-Object -Process
Set-QADuser -Identity "$_.'DisplayName'" $_ -ObjectAttributes @{'msRTCSIP-Line'="$_.'Phone'"}
Message was edited by: Jason Merrill