Setting expiry dates on AD accounts is a common occurrence and is well documented. Setting expiry dates on local accounts is also possible $user = [adsi] "WinNT://./Test1, user" $expirydate = ( Get-Date ) . AddDays ( 2 ) $user . Put ( "AccountExpirationDate"...