Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. $psscriptpath = "C:inetpubhtdocsschool_panelscriptschange.ps1";
  2. $cmdlet = "powershell.exe -executionpolicy remotesigned -File {$psscriptpath} -username {$username} -password {$password} < NUL";
  3. echo $cmdlet;
  4. $output = shell_exec($cmdlet);
  5. echo $output;
  6.  
  7. powershell.exe -executionpolicy remotesigned -File C:inetpubhtdocsschool_panelscriptschange.ps1 -username testingacount -password TestingTest321 < NULSet-ADAccountPassword : Access is denied
  8. At C:inetpubhtdocsschool_panelscriptschange.ps1:18 char:22
  9. + Set-ADAccountPassword <<<< $username -NewPassword $newpwd -Reset
  10. + CategoryInfo : PermissionDenied: (testingacount:ADAccount) [Set-ADAccountPassword], UnauthorizedAccessException
  11. + FullyQualifiedErrorId : Access is denied,Microsoft.ActiveDirectory.Management.Commands.SetADAccountPassword
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement