bergquistcompany
asked on
How to set Powershell to change ExtensionAttribute15 on AD User
Hello EE,
I am new to powershell and have to set a series of attributes to AD users. I would like to see if anyone can assist me in writing the proper code to change it for one user and then what would be the next step if I had multiple?
thanks
I am new to powershell and have to set a series of attributes to AD users. I would like to see if anyone can assist me in writing the proper code to change it for one user and then what would be the next step if I had multiple?
thanks
ASKER
When I run Get-QADUser restore2009 | Set-QADUser -objectAttributes @{extensionAttribute15="No Sync" It returns to the next line with
>>
Does this mean it worked?
>>
Does this mean it worked?
You are missing a closing curly bracket.. "}"
Copy the complete code from my post...
And if you want to check, following command will return you the extensionAttribute values of user restore2009 ..
Get-QADUser restore2009 -IncludeAllProperties | Select extension*
Copy the complete code from my post...
Get-QADUser restore2009 | Set-QADUser -objectAttributes @{extensionAttribute15="NoSync"}
And if you want to check, following command will return you the extensionAttribute values of user restore2009 ..
Get-QADUser restore2009 -IncludeAllProperties | Select extension*
ASKER
I think you are right but it doesn't recognize Get-QADUser. I am going to cmd and into Powershell am I to do something further before entering?
Do you have Quest AD cmdlets installed on your computer? if not you can download the cmdlets for free..
Ref : http://www.quest.com/powershell/activeroles-server.aspx
Once you install the Quest AD Shell you can find the Console
ActiveRoles Management Shell for Active Directory from start menu..
Ref : http://www.quest.com/powershell/activeroles-server.aspx
Once you install the Quest AD Shell you can find the Console
ActiveRoles Management Shell for Active Directory from start menu..
ASKER
Yes I launch it as you can see in attached snapshot and it goes to next line but when I go into ADSI after extension attribute15 is not set
Screen-Shot.docx
Screen-Shot.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Goes to next line but no result see attached
output.docx
output.docx
That means the command unable to find the user.. What is the samaccountname of user? is it in the same domain where you run the script?
ASKER
Perfect that was it had to run it from the child domain
FYI.. You can use Connect-QADService to connect to a different domain..
http://wiki.powergui.org/index.php/Connect-QADService
http://wiki.powergui.org/index.php/Connect-QADService
Try..
Open in new window
for bulk modification..
If you have a list of users the you can try..
Open in new window
Input file format..Open in new window
You can download the cmdlets for free..Ref : http://www.quest.com/powershell/activeroles-server.aspx