Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Set-ADAccount Script Help

$
0
0

Hi,

I need a powershell scripts to clear the password on a series of AD accounts and unlock them if they are locked. I want to use the below format to take the users from a text file. I can't see how to use the Get-ADAccount when doing multiple accounts from a list as when I use it individually I use the -identity paramenter. Can someone please help me add the Get-ADAccount command to the below script to blank the password in the users.txt file and unlock the accounts?? Your help is much appreciated.

$userList = Get-Content c:\users.txt

foreach ($user in $userList) {

}


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>