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

how to set a tick box on a user property

$
0
0

On AD users there is a tick box called "Password never expires"   For a handful of users I need to check this box and I'm having issues.

(Get-ADUser-Filter*-SearchBase"ou=Test,dc=acme,dc=org").Name | ForEach {
$user=get-aduser$_
Set-ADObject-Identity$user-PasswordNeverExpires$True}

this gives many errors.  It says it can't find the users yet they are there.  How is this done?   

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles