I know many of the build administrators are deploying the Task
Sequence on unknown device collection. I purpose and the idea behind it is to
do not deploy the task sequence on a production device and prevent accidental
data loss.
If the machine is in SCCM collection and we want to run the task
sequence on it, we must SCCM Console and do a manual deletion job and wait for
a couple of minutes to restart the imaging on the target machine
This is a time-consuming and repetitive task for us. Can we create
a way to do this in an automotive way? Like, create the PowerShell Script,
which will automatically read the machine's MAC Address and connect to the SCCM
database from the WinPE environment for getting all the hostnames to hold by
that mac address and delete each.
Also, can we do a diskpart at the same time to avoid further
imaging failure? Yes we can create the PowerShell Script and integrate it
with Boot Image, which will automatically check whether the machine having an
internal storage device attached or not, and based on the results script will
perform Diskpart operation, if the internal storage device is faulty or not
connected in BIOS, the script will prompt the error.