?
Solved

How to set Powershell to change ExtensionAttribute15 on AD User

Posted on 2013-06-05
11
Medium Priority
?
2,050 Views
Last Modified: 2013-06-17
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
0
Comment
Question by:bergquistcompany
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 40

Expert Comment

by:Subsun
ID: 39221987
If you have Quest AD cmdlets, then it's as simple..

Try..
Get-QADUser username | Set-QADUser -objectAttributes @{extensionAttribute15="value"}

Open in new window


for bulk modification..
If you have a list of users the you can try..
GC c:\User.txt | Get-QADUser | Set-QADUser -objectAttributes @{extensionAttribute15="value"}

Open in new window

Input file format..
UserA
UserB
UserC

Open in new window

You can download the cmdlets for free..
Ref : http://www.quest.com/powershell/activeroles-server.aspx
0
 

Author Comment

by:bergquistcompany
ID: 39222000
When I run Get-QADUser restore2009 | Set-QADUser -objectAttributes @{extensionAttribute15="NoSync" It returns to the next line with

>>

Does this mean it worked?
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39222028
You are missing a closing curly bracket.. "}"

Copy the complete code from my post...
Get-QADUser restore2009 | Set-QADUser -objectAttributes @{extensionAttribute15="NoSync"}

Open in new window


And if you want to check, following command will return you the extensionAttribute values of user restore2009 ..
Get-QADUser restore2009 -IncludeAllProperties | Select extension*
0
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

by:bergquistcompany
ID: 39226329
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?
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39226439
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..
0
 

Author Comment

by:bergquistcompany
ID: 39234589
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
0
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 39234610
What is the output of
Get-QADUser restore2009 -IncludeAllProperties | Select extension*

Open in new window

0
 

Author Comment

by:bergquistcompany
ID: 39242023
Goes to next line but no result see attached
output.docx
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39242062
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?
0
 

Author Comment

by:bergquistcompany
ID: 39253651
Perfect that was it had to run it from the child domain
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39253678
FYI.. You can use Connect-QADService to connect to a different domain..
http://wiki.powergui.org/index.php/Connect-QADService
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question