never expire password
This commit is contained in:
parent
353b86ab26
commit
494661eaff
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ func SetUserPassword(username string, password string) {
|
|||
psCmd := fmt.Sprintf(`
|
||||
$username = "%s"
|
||||
$password = ConvertTo-SecureString "%s" -AsPlainText -Force
|
||||
Set-LocalUser -Name $username -Password $password
|
||||
Set-LocalUser -Name $username -Password $password -PasswordNeverExpires 1
|
||||
`, username, password)
|
||||
|
||||
// Execute PowerShell command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue