I threw together a script in our Computer DC that filters out laptops that aren’t in group X or Group Y and then adds them to it. I added the script to task scheduler and have the box selected to run elevated. When I run it, it says it completed successfully, but isn’t adding the group to my test computer. If I run PS in administrator and execute the script it runs perfectly fine – but in non elevated it states “insufficient rights” (obviously).
Any idea why it would be not elevating the PS window or how I can force it to?
Thanks for any help!
submitted by /u/deadspace-
[link] [comments]
The post How to get Task Scheduler to run my script in elevated PS? appeared first on How to Code .NET.