One of the global companies has hired an inexperienced Active Directory administrator. His name was Jack. He always wants to work in the IT department. Now his dreams came true. 

One day in the morning, he received a request from the HR department. He had to change the title attribute for a thousand users. He was scared. The senior Administrator was on vacation. He didn’t know how to do it with Powershell. 

What to change 

He had to change Consultant string to Project Manager. The bad news for him was that sometimes the title attribute contains Senior or Junior prefix. 

Jack’s manager informed him that he had to resolve the request today. After a few hours, he still didn’t know how to make bulk changes.  

Jack knows how to change the Active Directory user attribute with the Set-ADUser command. He also knows Foreach Loop and how it works. 

One thing he didn’t know is how to replace only Consultant string.

Powershell Replace operator

When Jack has despaired, he found an article with Powershell Replace Method. That was it. He got down to work. 

First, he wrote the one-line command to try how it works.

powershell replace

Now he runs this method for one Active Directory user from the request.

powershell replace

Everything works fine, so he runs it for all users. 

powershell replace

Jack closed the request and went home. He was happy, like never before. 

As you can see, one Powershell topic can improve your work as an IT Admin. Have you a similar story in your job? Write in the comments.

Get Access to Poshland Resources for FREE!!!

Signup now and receive an email once I publish new content.

I agree to have my personal information transfered to MailChimp ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.