Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Quest Set-QADUser bulk Attributes

$
0
0

Hello,

I have a requirement to change the Telephone Number of existing staff. Currently the staff has their officeNumber followed by Ext number.

I can export the existing telephone number and amend the CSV file to match the new number by this command;

Get-QADUser -SearchRoot 'DomainName.com/DomainUsers/Staff' | Select-Object SamAccountName, TelephoneNumber | Expo
rt-Csv C:\Scripts\UsersExtension.csv

The CSV list will be updated to match the new telephone number and will use the updated list to amend the user's telephone number.

I have used the below command but it doesn't work;

Import-Csv c:\Scripts\UsersExtension.csv | ForEach-Object {Set-QADUser -Identity $_.sAMAccountName -ObjectAttributes @{extensionAttribute $_.TelephoneNumber}

Any help to get this done, highly appreciated.

Regards,


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>