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 – http://gallery.technet.microsoft.com/scriptcenter/SCCM-Client-Tools-f74b6ede