Files
qmi-cloud-tf-modules/vm-fromsnapshot-win/scripts/password.ps1
2020-10-26 10:47:53 +01:00

12 lines
313 B
PowerShell

Param(
[string] $Username,
[string] $Pass
)
Import-Module "Carbon"
$secpasswd = ConvertTo-SecureString $Pass -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($Username, $secpasswd)
Install-User -Credential $cred
Write-Log "Done! Setting new password to user $Username"