Kaido Järvemets's Blog

"PowerShell is my passion!"




21st Sep 2014

Scripts and links from my sessions @IT/Dev connections

A big thanks to all who attended at our sessions. Below are the links to the scripts and blog post we referenced during the session. Hope to see you all again next year! Managing Configuration Manager with PowerShell  Building Custom Tools Using PowerShell  Truly Better Together: Configuration Manager 2012 R2 and PowerShell  Quick and Dirty – […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  Comment

8th Jul 2014

Coretech Configuration Manager 2012 R2 PowerShell automation module 0.1

During the TechEd Kent showed one of our solution that allows you to save all the Collections to an Excel file or to create Collections based on Excel template. We have received a lot of emails and twitter tweets that when we are going to publish it and good news is that we will publish […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  3 Comments

11th Jun 2014

Working with Security Scopes in Configuration Manager with PowerShell

Last year @MMS Kent showed our automated RBA solution and I just discovered that this does not work in ConfigMgr 2012 R2 CU1 environment. It seems like they have changed the process behind the UI and in ConfigMgr 2012 R2 CU1 environment they are using different IDs to identify the Object. Before they used FolderTypeID […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  1 Comment

2nd Apr 2014

How to change Configuration Manager Hardware Inventory Schedule Client Setting

Today I tried to modify Hardware Inventory Schedule client setting and it didn’t work. First I thought that I did something wrong or the cmdlet is broken. Here is the cmdlet Verbose output Then I thought that, lets disable the HW client setting and then enable the HW client setting with correct schedule and Bingo […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  Comment

25th Mar 2014

Export out User Device Affinity Relationship with PowerShell

This script allows to export out specific collection UDA Relationships to a CSV file. Here is the script it self. Run it on your Primary Site Server and then open the CSV file with Excel. <# .Synopsis This script exports out specific collection UDA Relationships .DESCRIPTION .EXAMPLE Export-CMUDARelationships.ps1 -DeviceCollectionName "All Systems" -OutPut C:\Scripts\Reports\UDA.csv -SiteCode PS1 […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell  |  1 Comment

24th Mar 2014

The EASY WAY – List objects in specific folder in Configuration Manager 2012 with PowerShell

Last week I saw one blog post how to list specific folder objects and I believe that actually there is much easier way to list the objects in specific folder. First we need to figure out the ContainerNodeID which is the folder unique ID. We have several ways to find out the folder unique ID, […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  5 Comments

19th Mar 2014

How to move objects in Configuration Manager Admin Console with PowerShell

Starting with Configuration Manager 2012 R2 we have a cmdlet called Move-CMObject. This cmdlet allows to move different objects in Admin Console. We still don’t have a cmdlet that allows to create ConfigMgr Admin Console folders but if necessary you can use this code to create folders. Here are 6 different examples How to move […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  6 Comments

14th Feb 2014

Simple workflow for Configuration Manager Client installation

Here is a really simple Configuration Manager Client installation PowerShell workflow. This workflow queries all the clients where ClientType property is NULL. You can easily add logging, scheduling etc. workflow Install-CMClient { Param( $SiteCode, $SiteServer ) $Computers = Get-WmiObject -Namespace "Root\SMS\Site_$($SiteCode)" ` -Query "Select Name from SMS_R_System where ClientType is NULL" -PSComputerName $SiteServer Write-Output -Input […]

Category: Configuration Manager, Configuration Manager 2012 R2, Powershell, Scripting  |  1 Comment

30th Jan 2014

Dealing with Network Printers in Configuration Manager 2012

There are multiple ways how you can add a network printer to a PC and of course you can do that also with Compliance Settings in Configuration Manager. In PowerShell we can use Add-Printer cmdlet and if you don’t have the latest PowerShell version, then you can use Win32_Printer WMI class to add the Printer. […]

Category: Configuration Manager, Configuration Manager 2012 R2, Desired Configuration Management, Operating Systems, Powershell, Windows 8  |  3 Comments

23rd Jan 2014

Windows Azure Pack PowerShell command-lets

I just posted on CM12SDK Windows Azure Pack command-lets excel sheet.   You can download the excel sheet from here Cheers  

Category: Windows Azure Pack  |  Comment