Kaido Järvemets's Blog

"PowerShell is my passion!"




9th Apr 2015

Azure RMS PowerShell cmdlets

Here are the Azure RMS PowerShell cmdlets excel sheet. There are totally 44 cmdlets in AADRM Module. You can download the Azure Rights Management Administration Tool from here You can download this excel sheet from here

Category: Home  |  Comment

23rd Mar 2015

Create Status Filter Rules with PowerShell

Here is a quick example of creating a Status Filter Rule in Configuration Manager with PowerShell #Example 1 New-CMStatusFilterRule -SiteCode PS1 -Name ‘Remove PC from OSD Collection’ -MessageId 11144 -MessageType Milestone ` -RunProgram $True -ProgramPath ‘C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file D:\Scripts\Remove-CMDeviceFromCollection.ps1 -CollectionName "OSD Windows 8 Standard" -ComputerName %msgsys’ #Example 2 $Parameters = @{ SiteCode = ‘PS1’ Name = […]

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

19th Mar 2015

Beyond unsupported – How to add PowerShell ISE to ConfigMgr Admin Console

As you already know, then currently we can only start PowerShell Console through Configuration Manager Admin Console but most likely  you may want to start PowerShell ISE through Admin Console Step-by-step guide First, this is not supported so don’t blame me if something is not working. Please also remember that there is no SAVE button […]

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

18th Mar 2015

Working with Queries in ConfigMgr with PowerShell

I accidentally blew up my dev lab and now I need to build a new one but luckily we have PowerShell :). In this picture we have 8 Queries and I would like to create Device Collections based on these Queries. These Queries are built with Servicing Extension.   Here are some of the commands […]

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

16th Mar 2015

Quick intro to Configuration Items in ConfigMgr with PowerShell

Configuration Items that I would like to export and import   Here are some command examples that we can use in Configuration Manager 2012 R2 CU4. #Import Module Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") $SiteCode = Get-PSDrive -PSProvider CMSITE Set-Location "$($SiteCode.Name):\" #Get all CIs $ConfigurationItems = Get-CMConfigurationItem #Total CIs $ConfigurationItems.Count #Get CIs only with specific keyword $ConfigurationItems = Get-CMConfigurationItem […]

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

12th Mar 2015

Slides and scripts from Lab Center ConfigMgr automation with PowerShell seminar

Thanks for attending! You can download the slides and scripts from here Best, Kaido

Category: Home  |  1 Comment

3rd Feb 2015

New ConfigMgr PowerShell cmdlets in CU4

Microsoft just released a new CU for Configuration Manager and with latest CU we got 35 PowerShell cmdlets. Now we have 597 PowerShell cmdlets. Here are the new ones: Add-CMDeploymentTypeDependency Add-CMDeploymentTypeSupersedence ConvertFrom-CMApplication ConvertFrom-CMConfigurationItem ConvertTo-CMApplication ConvertTo-CMConfigurationItem Get-CMCertificate Get-CMClientOperation Get-CMDeploymentTypeDependency Get-CMDeploymentTypeDependencyGroup Get-CMDeploymentTypeSupersedence Get-CMMigrationSource Get-CMObjectSecurityScope Get-CMQuery Get-CMSiteRole Invoke-CMGroupDiscovery Invoke-CMQuery Invoke-CMSystemDiscovery Invoke-CMUserDiscovery New-CMADGroupDiscoveryScope New-CMDeploymentTypeDependencyGroup New-CMEmbeddedObjectInstance New-CMEmbeddedProperty New-CMEmbeddedPropertyList New-CMQuery Remove-CMCollection […]

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

18th Dec 2014

Create ConfigMgr Collections and Admin Console Folders with PowerShell

Starting from ConfigMgr 2012 R2 we can use New-Item PowerShell cmdlet to create ConfigMgr Admin Console folders. Here is one simple and quick PowerShell script that allows you to create folders and Collections and finally it moves the Collection to correct folder. #Step 1 Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") $SiteCode = Get-PSDrive -PSProvider CMSITE Set-Location "$($SiteCode.Name):\" #Step 2 […]

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

2nd Dec 2014

Change device ownership in Configuration Manager with PowerShell

All newly enrolled devices are enrolled as Personal Devices by default in Configuration Manager and we cant change the default behavior. If the Device Ownership is Company, then we can inventory all the installed applications and we can also do mandatory installations. If the Device Ownership is Personal, then we can inventory only applications that […]

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

30th Sep 2014

Configuration Manager 2012 SP1 and R2 PowerShell Provider

Updated 23.03.2015! As you might have already noticed that Configuration Manager PowerShell Provider is lot like Active Directory, Registry etc. provider. To run a cmdlet you need to be inside CMSITE. If you are still using SP1+, then: 1. you can´t use New-Item cmdlet to create folders 2. you can´t set the location to sub […]

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