by stu_mchugh at 2012-09-20 04:17:09
I’m trying to workout (and failing) how to set the “Password Never Expire” check box for a list of users in a CSV. I have tried with the follow code but don’t know to set the flagby poshoholic at 2012-09-20 04:44:21
$import=import-csv -Path "C:\stu\scripts\test.csv"
foreach($dataRecord in $import)
$user=get-QADUser -identity $sAMAccountName
set-QADUser -identity $sAMAccountName
After the “Set-QADUser” and indentifty the user I don’t know how to set the password flag???
You need to use the -PasswordNeverExpires parameter, like this:by stu_mchugh at 2012-09-20 06:05:56
Set-QADUser -Identity $sAMAccountName -PasswordNeverExpires $true
Nice one! thanks!by RichardSiddaway at 2012-09-20 11:09:10
If you can’t use the quest cmdlets the other ways of doing it are given in this post
http://msmvps.com/blogs/richardsiddaway … xpire.aspx