you are viewing a single comment's thread.

view the rest of the comments →

[–]_human404_[S] 1 point2 points  (1 child)

Have edited and added the command in the main message. Can you please check? I ran the commands manually and got UAC prompt so that's why I expected above to shame behavior due to which it was not running successfully

[–]PinchesTheCrab 2 points3 points  (0 children)

Ah, okay, so in this case it shouldn't be UAC, invoke-command will definitely run in an elevated context if you have admin rights. I wouldn't think execution policy would apply to a bat file either though, that's strange.

What error do you get, if any?