Posted On October 23, 2020

PowerShell: Set User Option Change Password At Next Logon

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell: Set User Option Change Password At Next Logon
$ou="OU=Users,DC=corp,DC=hooli,DC=com"
$usersInOu=Get-ADUser -Filter * -SearchBase $ou
$usersInOu|Set-ADUser -CannotChangePassword:$false -ChangePasswordAtLogon:$false

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Accessing the Reflection Assembly Class to Retrieve User Context

Step 1: Accessing Reflection Assembly namespace to call method Load with Windows Account Management as…

Quick 1-liner: get system model number

# the 1-linerwmic computersystem get model,name,manufacturer,systemtype# Get RAM DIMM Slotswmic memorychip get Capacity /format:list

Create a Report of MTU Settings on All Hyper-V Hosts in the Domain/Forest

# mtuReportAllHyperVHosts.ps1 # Ensure that AD management module is available for PS Session function includeRSAT{…
Other project: DragonCoin.com