- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have never had any issues with the SCCM client being baked into the template as long as you delete the certs and delete the file I mentioned above
Why bother removing the agent on Decommissioning? Just let the VM be deleted, and delete the object in SCCM using the command:
$compObject = get-wmiobject -query "select * from SMS_R_SYSTEM WHERE Name='$vm'" -computername SCCMServer -namespace "ROOT\SMS\sitecode"
$compObject.psbase.delete()
This looks similar to what you are doing anyway