AD user pager, mobile phone attribute update for bulk users


Mobile phone & pager number backup for bulk users:

Import-Csv F:\Yogi\users.csv | foreach { Get-ADUser -Identity $_.samaccountname -Properties * } | Select SamAccountName, mobile, pager | Export-Csv -NoTypeInformation F:\yogi\backups.csv

Change the attribute for bulk users:

import-module activedirectory
Import-Csv F:\Yogi\users.csv | ForEach-Object {Set-ADUser -Identity $_.samAccountName -Replace @{Mobile=$_.MobilePhone;pager=$_.pager}}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: