TheSleepyAdmin / Scripts

Powershell scripts
112 stars 63 forks source link

schtasks.exe : ERROR: Access is denied. #3

Open jgriff500 opened 1 year ago

jgriff500 commented 1 year ago

General/Scheduled task/Check_RunAsAccount.ps1 -- have you found a way to make this script overcome the restrictions on running schtasks?

I get "schtasks.exe : ERROR: Access is denied."

Did some searching and haven't found a good solution to overcome this.

jgriff500 commented 1 year ago

More research ... get-scheduledtask -cimsession $server will work.

Cool script and very helpful. Please consider updating.