Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $psscriptpath = "C:inetpubhtdocsschool_panelscriptschange.ps1";
- $cmdlet = "powershell.exe -executionpolicy remotesigned -File {$psscriptpath} -username {$username} -password {$password} < NUL";
- echo $cmdlet;
- $output = shell_exec($cmdlet);
- echo $output;
- powershell.exe -executionpolicy remotesigned -File C:inetpubhtdocsschool_panelscriptschange.ps1 -username testingacount -password TestingTest321 < NULSet-ADAccountPassword : Access is denied
- At C:inetpubhtdocsschool_panelscriptschange.ps1:18 char:22
- + Set-ADAccountPassword <<<< $username -NewPassword $newpwd -Reset
- + CategoryInfo : PermissionDenied: (testingacount:ADAccount) [Set-ADAccountPassword], UnauthorizedAccessException
- + FullyQualifiedErrorId : Access is denied,Microsoft.ActiveDirectory.Management.Commands.SetADAccountPassword
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement