local: ---------- ID: C:\\ProgramData\\test-script.ps1 Function: file.managed Result: True Comment: File C:\\ProgramData\\test-script.ps1 is in the correct state Started: 12:39:43.033827 Duration: 93.753 ms Changes: ---------- ID: create_user Function: user.present Name: testuser Result: True Comment: New user testuser created Started: 12:39:43.143240 Duration: 156.215 ms Changes: ---------- account_disabled: False account_locked: False active: True comment: description: disallow_change_password: False expiration_date: 2106-02-07 06:28:15 expired: False failed_logon_attempts: 0 fullname: testuser gid: groups: home: homedrive: last_logon: Never logonscript: name: testuser passwd: XXX-REDACTED-XXX password_changed: 2021-11-02 12:39:43 password_never_expires: False profile: None successful_logon_attempts: 0 uid: S-1-5-21-345677976-3360602060-1957315063-1011 ---------- ID: run_script Function: cmd.script Result: False Comment: Command 'run_script' run Started: 12:39:43.299455 Duration: 3390.692 ms Changes: ---------- pid: 10780 retcode: 1 stderr: ^C:\ProgramData\Salt Project\Salt\var\cache\salt\minion\tmpf8aet_77\__salt.tmp.mcmm8242.ps1^ : The term '^C:\ProgramData\Salt Project\Salt\var\cache\salt\minion\tmpf8aet_77\__salt.tmp.mcmm8242.ps1^' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ^"C:\ProgramData\Salt Project\Salt\var\cache\salt\minion\tmpf8aet_77\ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (^C:\ProgramData...p.mcmm8242.ps1^:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException stdout: ---------- ID: delete_user Function: user.absent Name: testuser Result: True Comment: Removed user testuser Started: 12:39:46.690147 Duration: 500.004 ms Changes: ---------- testuser: removed Summary for local ------------ Succeeded: 3 (changed=3) Failed: 1 ------------ Total states run: 4 Total run time: 4.141 s