How to add computers listed in a text file to a collection

Using the new ConfigMgr 2012 PowerShell cmdlets, there are three different ways to add computers to a device collection.  Just like in the console, you can add computers via a direct membership rule (Add-CMDeviceCollectionMembershipRule), a query membership rule (Add-CMDeviceCollectionQueryMembershipRule) and also an include collection membership rule (Add-CMDeviceCollectionIncludeMembershipRule).  In order to use these cmdlets, the collection…

Creating Schedules with New-CMSchedule

If you ever did any schedule creation prior to the two new PowerShell cmdlets (New-CMSchedule and Convert-CMSchedule), then you probably already know how tricky it was working with scheduled tokens and are going to welcome these new cmdlets.  In this blog post, I am going to show you how easy it is to use New-CMSchedule…

ConfigMgr and PowerShell ISE (x86)

I typically run the PowerShell ISE (x86) (instead of the PowerShell command prompt) when running commands and writing scripts for ConfigMgr. It provides the flexibility to highlight portions of your script and execute just that section. You can also echo out the contents of a variable on the command line below at any time to…

Fun with PowerShell – Formatting Numbers

Recently, I had the need to develop a consistent numbering format in order to maintain character length and ordering for collection names in ConfigMgr.  The basic idea was to create 31 collections, each that have the number in the name a keeping all of them to two digits.  So, for the numbers less than ten,…