Using Windows PowerShell to convert collection membership rules

I developed some automation for a customer to help them manage the lifecycle of collections used for assignment of DCM baselines as they are revised.  Part of this required the ability to convert a collection from query-based membership to direct membership rules and vice versa.  I realize this is a very niche piece of automation,…

0

Verifying Configuration Manager Backup Task with Windows PowerShell

A seemingly simple requirement for a Desired Configuration Management configuration item is to verify that the Configuration Manager 2007 site backup maintenance task is enabled.  What became the difficult part of this was tracking down the specific location in WMI that this data exists.  I have to give credit to Jamie Moyer for pointing me…

0

Using SMBIOS GUID to import computer information for VMware guest

To import computer information into Configuration Manager for OS deployment you have to enter the computer name and then one or both of the following unique identifiers: MAC address or SMBIOS GUID, aka UUID.  Many customers use the MAC address because it is shorter and typically more accessible.  However, if the UUID is required this…

4

Generating a random password with PowerShell

Instead of bashing on the keyboard, I’m a proponent of using a tool to generate a random password, such as when creating a service account or new user accounts.  A colleague of mine recently discovered that this is doable with Windows PowerShell, in only two lines! Add-Type -Assembly System.Web [Web.Security.Membership]::GeneratePassword($length,$numberOfNonAlphanumericCharacters) This will return a string…

4

Windows PowerShell Script Library for MDT

At the Microsoft Management Summit 2011 in March I presented session BF21, Accelerated Scripting with the MDT Framework.  The session focused on using the VBScript libraries built-in to MDT to reduce the amount of time to write custom scripts and using a common framework and best practices for more lasting scripts. Some of the advantages…

0

MMS 2011 Session

A little self-promotion….  BF21 Accelerated Scripting with the MDT Framework Speaker(s): Aaron CzechowskiTrack(s): Server Management Technologies, Solution Accelerators, Systems ManagementSession Type: Breakout SessionProduct(s): Configuration Manager 2007 R2 & R3, Microsoft Deployment Toolkit, Solution Accelerators, Windows PowerShell This session will help you accelerate and standardize your VBScript or Windows PowerShell scripts using a proven framework. We…

4

Check-WsusContentHash.ps1

I wrote the attached script to recursively parse a WsusContent directory and compare the file name to the SHA1 hash of the file.  This performs a basic verification that the content is valid.  WSUS does this by itself, but when moving the content across to a disconnected network I recommend validating the content first to…

1

PowerShell to change ConfigMgr Client Cache size

Don Hite has a VBS Script To Change A Remote SMS Clients Cache Size, but I wanted to do it with PowerShell:$Cache = Get-WmiObject -namespace root\ccm\SoftMgmtAgent -class CacheConfig$Cache.size = 10240$Cache.InUse = “True”$Cache.Put()Restart-Service ccmexec I added line 3 after trying the size change and the bottom of the Advanced tab on the ConfigMgr control panel was…

1

ConfigMgr Software Updates on an Isolated Network

The Windows Server Update Services (WSUS) 3 Deployment Guide documents a process by which update metadata and update content can be transferred from one server to another isolated server.  Since Configuration Manager 2007 relies upon WSUS for the software update plumbing, a similar process can be used to transfer updates to an isolated network for…

3