Export CSV SCCM software report using PowerShell

When you are taking over an SCCM setup from another technician – or want an insigt on your own setup – it might be difficult to get an overview of the different software deployments that are configured, and in which task sequences they may have been put to use. With this script you’ll get a full overview of all applications, packages and their task sequence relations. The point of making these reports is to quickly indentify which application, or package that could be deleted.

Read moreExport CSV SCCM software report using PowerShell

Move computer object in a SCCM Task Sequence using a PowerShell script

This script is useful if you re-image a machine which will re-use its AD computer name, or a new machine which needs to be moved to a specific OU chosen in a HTA.
Follow the steps in the script description to accomplish this and match the step in the image.

Read moreMove computer object in a SCCM Task Sequence using a PowerShell script

Automatically create device collections based on software metering rules

I had a lot of software  at a costumer which needed to be uninstalled automatically because of expensive licencing. I stumbled upon this article from systemcenterdudes where Nicolas Pilon have created queries and collections in SCCM containing exactly what i needed. Based on that article i created a powershell script to do that for me.

Read moreAutomatically create device collections based on software metering rules

Fixing the Software Metering agent when having error 80070424 in the mtrmgr.log

I was configuring Software Metering at a costumer when reports seemed wrong. The costumer had already configured metering on Visio,exe which had been running for years, but only 60  installations was reporting usage in the past 120 days out of 540 total installations. I checked maintenance task on the site server and client settings to ensure that the server and clients was configured correct.
I looked into some of the log files on the clients and found this error:

StartPrepDriver – OpenService Failed with error 80070424

Read moreFixing the Software Metering agent when having error 80070424 in the mtrmgr.log

Create an SCCM collection with Powershell WMI

Automation is the keyword to get rid of repetitive tasks – then you can focus on the real work right?

So here we go again, this time to create a User Collection with the SMS_Collection WMI class.
I only used this function to create user collections, but can easily be modified to create device collections. Link to the WMI class in the bottom.

Also this function uses the log function which you can find here: here

Read moreCreate an SCCM collection with Powershell WMI

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 moreRemove a PC object from a domain in WinPE with Powershell