SCCM Client Functions


Welcome to my first WordPress Blog post, I hope you enjoy it.

I’m writing today about a set of functions I created a few months ago, you can download the functions from the microsoft script repository here.  I needed to be able to kick off the application evaluation cycle on a set of test VMs in my lab and I was really tired of getting at the agent through the control panel.  I figured that as a PowerShell scripter I should be able to make a function for it.  It turns out that the SCCM Client has a pretty easy to use API, a COM object called:


So I started out by putting that COM object into a variable using the new-object command

$CPAppletMGR = new-object -ComObject CPApplet.CPAppletmgr

Then sent that variable onto get-member to figure out what I could do with it.  The Method that interested me the most was GetClientActions, it lists out all of the available actions, each of which has a method called PerformAction.  PerformAction just activates that particular action on the client.

There’s an entry for every action the client can take through the control panel so I built my functions around that.  It’s not super exciting but the tools will accept a list of computer names through the pipeline and start any specified action.  I think they’re pretty helpful when testing new Packages and applications in SCCM and useful for when you have tight maintenance windows for patching or installing packages in production.

I hope this was useful to someone and I’ll be back next week to talk about some tools I wrote for working with RDP.


SCCM Client Tools –

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to SCCM Client Functions

  1. Prabhu says:

    Hi, I need a favour… I indeed of powershell script to shutdown the Windows Terminal Server 2008R2 when there is no user logged in… Since I have hosted TS on AWS, this scrip would help me to automate the server shutdown. Please help me… Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s