Remove a PC object from a domain in WinPE with Powershell

This code i made to be able to make a cleanup task for PC’s no longer in use. This script remove computers from domain when running WinPE.
This was one of the steps that was done. Another step deleted objects in McAfee EPO and SCCM.
To be able to delete a PC within a domain from a non-domain PC you need to install ADSI on the WinPE image.

Read more

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