Start a Powershell script with a scheduled task

I was in a situation where i wanted to know which SCCM device collections a specific users devices where a member of. Therefore I created script which was executed as a scheduled task on a server. Here is an example on how to do that.

First create the scheduled task and run it with highest privileges and as another user if wanted. Could be an SCCM service account that only have access to certain WMI classes.

Read more