Add Update Content to a Deployment Package via PowerShell in ConfigMgr 2012

Last week I read a forum question about downloading updates in a software update group. I thought that I could create an easy example, but it wasn’t all as easy as I thought it would. As there is no cmdlet available that performs this specific action, I went back to WMI. In WMI there is a method AddUpdateContent in the SMS_SoftwareUpdatesPackage that should do the trick. After playing around with it for a while I noticed that this method is not as straight-forward as it looks. The method The main problem I had with this method, was the documentation, or better, the lack of documentation. The SDK only contains a very old example that also doesn’t seem to use the right order for the parameters. …

Read more

Verify local administrators via PowerShell and Compliance Settings in ConfigMgr 2012

Everybody probably knows the inventory posts for local administrators by Sherry Kissinger, but what if you want to know the compliance of your devices. What if you “just” want to know if a device is compliant to company defaults for the local administrators. This blog post will provide an answer to that question. It will provide a script, including explanation, that can be used for compliance checks. This blog post won’t go into details about creating the Configuration Item and the additional Configuration Baseline. Script The script that will be the core of this Configuration Item consists of three key parts. Basically, it first finds the members of the local administrators group on the device, then verifies these members and in the end it returns …

Read more

Running a Service Management Automation (SMA) Runbook during a task sequence in ConfigMgr 2012

It’s been a few weeks since my last blog post, but here is a new one again. This time my blog post will be about running a Service Management Automation (SMA) Runbook during a task sequence. I will show this functionality by using an example scenario of moving a computer to a different OU.  A bit more than a year ago I did something similar but then via a Orchestrator Runbook, so this time I will take it a level further. For some, maybe even most, people and companies it might be a level to far, for now, but I would like to share it anyway. As I like ConfigMgr, PowerShell and automation, I like to prefer SMA above Orchestrator. Also, SMA will become more …

Read more

Using Service Management Automation (SMA) for tweeting status messages of ConfigMgr 2012

Already a bit more then a year ago I did a post about Tweeting the deployment status of a system via Orchestrator and ConfigMgr 2012. Sadly enough, the Integration Pack for Orchestrator, that I used in that post, doesn’t work anymore with the most recent Twitter API updates. As I still do get questions and comments about it, I thought it would be a good time to come up with an alternative. One thing was for sure, it had to be something custom. So easy decision here, PowerShell it is. The next thing is a bit more questionable, how will the script be started… This is the more difficult decision… either run it standalone, via Orchestrator, or via Service Management Automation (SMA). A standalone PowerShell …

Read more

Finally a 1.0 version of the Show Collection Details right-click action for ConfigMgr 2012!

I do have to admit that it took quite a while before I finally made a 1.0 version of this script/ form. Now it’s there, I also have to admit that I’m even a bit proud of it! It was a nice way of getting familiar with PowerShell and WMI. What does it look like? I won’t go through the list of all the fields that the tool shows, that list can be found here, but I did make a small movie for this final release with an overview about all the functionalities. Show Collection Details of a Device Where is it available? As of now this final version of my Collection Details Form is publicly available via the TechNet Galleries and for a direct …

Read more

Install User-targeted Applications during OS Deployment via PowerShell and ConfigMgr 2012

Let’s start my first post of this great new year with another nice PowerShell script. This post will be about deploying required user targeted applications, to the device of the primary user, during OS deployment. Yes, I know the setting of Pre-deploy software to the user’s primary device, but that doesn’t give enough control. After deployment, the device has to be completely ready for use. A bit more than a year ago I already did a post about pre-provisioning user applications during OS deployment via Orchestrator and ConfigMgr 2012. This time I wanted to make less assumptions. I also wanted to be sure that a user is a member of a collection and what the application is that is deployed to the collection. I first …

Read more

An Application Request with a lot of System Center Power via Orchestrator, ServiceMgr and ConfigMgr

As it Christmas, I wanted to do something special. That’s why dove into the world of ServiceMgr and came up with this long blog post about a combination of ConfigMgr, Orchestrator and ServiceMgr. This blog post will describe a configuration for a software request via the ServiceMgr Portal. I’m not going to say that I like the ServiceMgr Portal more than the Application Catalog of ConfigMgr, because I really don’t, but I do think it fits better within the processes of a company. Besides that, if it doesn’t fit, it can be customized. High Level Overview Like I stated the software request can be done via the ServiceMgr Portal. The portal will display applications that are imported, and after that filtered, via the ConfigMgr Connector. …

Read more

Showing Dependent Applications in ConfigMgr 2012 via PowerShell

This week I want to devote a blog post to finding dependent applications. Via the ConfigMgr Console it’s very easy to find the configured Dependencies of an Application, but what if I want to know which applications depend on a specific Application? Via the ConfigMgr Console this is not possible (out-of-the-box), but this doesn’t mean that the information is not accessible. In this blog post I will show where to find this information and I will show a complete script which will show the results in a nice form. Solution In WMI there is the class SMS_AppDependenceRelation. This class doesn’t contain any methods, but does contain a few interesting properties. These interesting properties are FromApplicationCIID, FromDeploymentTypeCIID, ToApplicationCIID and ToDeploymentTypeCIID. The properties mainly speak for themselves, …

Read more

Getting the Client Upgrade Settings of ConfigMgr 2012 with PowerShell

This week, my blog post will be a very short one. It will be a post about my tweet about the client upgrade settings, of a week ago. A big part of this information is also available via the Hierarchy Settings in the console. Script In WMI there is the class SMS_ImportedObject, which contains the method Get-ClientUpgradeSettings. This method can be used to get the client upgrade settings and doesn’t need any input parameters. It will give all the information, about the name, version and IDs and can be used via to the following code snippet: function Get-ClientUpgradeSettings { param ( [string]$SiteCode, [string]$SiteServer ) Invoke-WmiMethod -Namespace root/SMS/site_$($SiteCode) -Class SMS_ImportedObject -Name GetClientUpgradeSettings -ComputerName $SiteServer } Result The code snippet will give a result like under here. …

Read more

Approve, Block, Unapprove, or Unblock a Client in ConfigMgr 2012 via PowerShell

This blog post will show how to approve, block, unapprove, or unblock clients in ConfigMgr 2012 via PowerShell. Three of these actions, approve, block and unblock, are also accessible via the console, but via PowerShell it is very easy to perform these actions for a whole collections. This creates the possibility to create a custom automatic approval in combination with for example a collection membership. The fourth action, unapprove, is not accessible via the console and only accessible via WMI (with some help of PowerShell). Solution In WMI there is the class SMS_Collection, which has the methods ApproveClients and BlockClients. These methods can be used to (un)approve and (un)block clients and they require both the same two parameters. They both require a boolean and an …

Read more