Hi everyone,
Was hoping someone could give me a hand with regards to the SimpleHelp API. Likely I’m doing something wrong or what I wanna do just isn’t possible. I have the following toolbox:
$password = ConvertTo-SecureString “" -AsPlainText -Force
$cred= New-Object System.Management.Automation.PSCredential ("*”, $password )
New-PSSession -ComputerName *** -Credential $cred$sam=ServerUtilsAskTech (Login,text,username)
$newpass=ServerUtilsAskTech (Domain Password,password)Set-ADAccountPassword -Identity $sam -NewPassword (ConvertTo-SecureString -AsPlainText “$newpass” -Force) -Reset
It doesn’t appear like ServerUtilsAskTech actually stores the inputted information as the specified variable so the script breaks. It should be noted that it works if I hardcode the user and pass for the account in the script but it kind of defeats the purpose.
Thanks