Those looking forward to using some of the PowerShell cmdlets for System Center Configuration Manager might find at least of them to be troublesome. In some situations, the New-CMSiteSystemServer cmdlet will force-close PowerShell when run. So, basically, you execute the cmdlet and PowerShell just shuts down completely. Microsoft has released a hotfix for the problem, but suggests you only apply...
Are you a ConfigMgr (or SCCM) administrator? Are you sometimes (or often, like me) in a position where you need to rebuild your ConfigMgr 2012 lab environment? I, again, was in that situation and just came out of a very interesting discussion with a co-worker and thought to myself, why not use Desired State Configuration to do all that? I am calling it uber-Hydration Kit, but to be fair, it’s not 100% automated yet. There are still a couple of things that need to be done manually. I will explain later on, that is why it is still at version 0.9. Enter: Powershell Desired State Configuration I have already used … Continue reading →
In my previous article around Powershell DSC I demonstrated some very basic example of what DSC can do. This article will go a bit deeper and show you a complete solution where Desired State Configuration can come in very handy. I recently needed to deploy a couple of SMA (Service Management Automation) Runbook Worker machines. In this case I did not want to install them all manually, as I tend to forget some of the software requirements and I also don’t want to install too many unneeded server roles and features. I couldn’t find anything on the internet, so I thought I’d create a DSC config that will install all … Continue reading →
Powershell Desired State Configuration is a very powerful feature of Powershell 4.0 and Windows Server 2012 R2. Coming from a very strong Microsoft System Center Configuration Manager background I like to think of it a bit as Compliance Settings. I’m configuring a state I want a Server to be in and DSC makes sure it ends up looking like that (and even stays like that – remediation!). And all that, if you like, without the “overhead” of any additional infrastructure (and even for Linux!) Crazy?! More information around DSC can be found here: http://blogs.technet.com/b/privatecloud/archive/2013/08/30/introducing-powershell-desired-state-configuration-dsc.aspx and http://technet.microsoft.com/en-us/library/dn249912.aspx WindowsFeature resource in DSC Being based on Powershell, DSC knows certain keywords you can … Continue reading →
A customer of mine asked me to create a new Windows 8.1 Enterprise SOE (golden image, standard image, whatever) and also customise the Start Menu and Start Screen layout. This customer is pretty easy as most of their applications are web apps. Therefor I only have to deploy all the shortcuts to their web applications. Job done. Easy. I asked the customer to give me all their shortcuts so that I can then copy them to the default user’s profile during deployment (in this case MDT 2013 stand alone, but that doesn’t matter). All the shortcuts looked like this: “%programfiles%\Internet Explorer\iexplore.exe” https://www.google.com.au Regular shortcut you’d think, right? The special thing … Continue reading →
The PowerShell WMI Module was developed to make it easier to create custom WMI Namespaces and Classes. This module was inspired by Jason Sandys System Center Universe presentation on WMI Manipulations and Manifestations The module has been uploaded to TechNet Script Gallery. Get it here! Module Functions Get-WMINamespace This function returns an object containing the Namespace requested. Example: Get-WMINamespace –Namespace...
Lots of great presentations next week from my MVP colleagues. Register: We Speak Geek I’ll be presenting on Powershell and ConfigMgr. What scenarios would you like to see? Leave a comment on this post! GregFiled under: PowerShell
Piggybacking on Aaron Parker’s blog post for App-V 5 PowerShell One Liners – Adding and Publishing App-V Server Packages, I’ve extended the usage of the script to parse all sub-directories of a folder to add/publish any .appv package. And that’s all it takes!Filed under: App-V 5.0, Scripting
I say these (somewhat-cheesy) phrases frequently: “Right tool, right job” “Right tool for the job” “Golf club mentality” “Sometimes you have to choose between a 3-iron and a 9-iron..” Here’s an example I encountered this week. . . Our Remote Application Delivery team wanted to capture users who were launching applications from a specific farm. They knew […]
Here’s an example of creating collections (with maintenance windows) for server patching. Start with a .csv of servers, and the desired patch window (download sample csv). You then run the PowerShell script to group the systems and populate new collections. Download Script… (if you’re having trouble with copy/paste of the code, or if code doesn’t […]
This is a short note to everybody using my scripts for ConfigMgr or who plans on using any automation (Powershell, Orchestrator runbooks, whatever) based on the native Powershell cmdlets for ConfigMgr. Up until now I always thought it is “common knowledge”, but here you go: The account that executes your automation and has to run the SCCM cmdlets needs to install the signing certificate with which the ConfigMgr Powershell module was signed. This needs to be done manually!!! Before doing any automation, log on to the machine which has the admin console installed and against which your scripts, runbooks or whatever are being executed and do the following: If that … Continue reading →
When working with ConfigMgr I sometimes ask myself, “Hey, is this Package / Application / Image / … even used in a Task Sequence?”. I know that a lot of other people must ask themselves this question as well, from time to time at least. There are two ways you can do it and check if any of your objects is referenced somewhere else, via the console. I will show you that these two ways are either stupid or dangerous. Task Sequences References Tab You can check every Task Sequence in your environment via the console and have a look at the ‘References’ tab and see if the object you’re … Continue reading →