AD 2012 Move Atrribute Mobile Phone to Pager

akosinoah
akosinoah used Ask the Experts™
on
Im looking for a shell command i can use to migrate details from Mobile Phone attributes to Pager.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Joseph MoodyBlogger and wearer of all hats.
Commented:
You can try this powershell script out:

$Users = Get-ADUser -Filter * -Properties MobilePhone,Pager

foreach ($user in $Users){
Set-ADUser -pager $User.mobilephone -whatif -verbose
}

Open in new window

Author

Commented:
Hi Joseph,
Thank you for the script you have provided. I just have a 2 question is there way I could test with specific user in AD. and also I need the script to be to copy the details without removing the details from mobile phone attribute.
Blogger and wearer of all hats.
Commented:
1. Replace line one with
$Users = Get-ADUser -identity USERSAMACCOUNTNAME -Properties MobilePhone,Pager

Open in new window


2. This script doesn't remove the mobile phone attribute. It just copies it.

Author

Commented:
Thank you Joseph

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial