-
This is a little more verbose than the WinNT example function set-expirydate { [ CmdletBinding ( SupportsShouldProcess = $true ) ] param ( [ parameter ( ValueFromPipeline = $true , ValueFromPipelineByPropertyName = $true ) ] [string] $computer , [ parameter...
-
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"...