win become: refactor and add support for passwordless become (#48082)

* win become: refactor and add support for passwordless become

* make tests more stable

* fix up dep message for Load-CommandUtils

* Add further check for System impersonation token

* re-add support for become with accounts that have no password

* doc fixes and slight code improvements

* fix doc sanity issue
This commit is contained in:
Jordan Borean 2018-12-13 11:15:25 +10:00 committed by Matt Davis
commit 190d1ed7f1
13 changed files with 2586 additions and 1105 deletions

View file

@ -28,7 +28,7 @@
- cmdout is not changed
- cmdout.cmd == 'bogus_command1234'
- cmdout.rc == 2
- "'Could not locate the following executable bogus_command1234' in cmdout.msg"
- "\"Could not find file 'bogus_command1234.exe'.\" in cmdout.msg"
- name: execute something with error output
win_command: cmd /c "echo some output & echo some error 1>&2"