Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Change AD attributes for users from Text

$
0
0

Hello

I have two text files.  One contains username.  Another one contains the value that I want to change for according usern.

username.txt

user1

user2

 

employeeid.txt

100

200

Here is my command to change the AD attribute

$b= Get-Content c:\temp\employeeid.txt

Get-Content c:\temp\username.txt | Foreach-Object { Set-ADUser–Identity$_ -EmployeeID"$b"}

The result does not come out right as I expected.  I know I did not do it right at - EmployeeID.  But do not know how to fix it.

May you help me?

Thank you

Johnathan


Viewing all articles
Browse latest Browse all 8583

Trending Articles