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 = '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' } New-CMStatusFilterRule @Parameters Execute the code     Happy Scripting

By |2015-03-23T13:16:47+01:00marts 23rd, 2015|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Create Status Filter Rules with PowerShell

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 in Admin Console Builder Tool! Close ConfigMgr Admin Console Start AdminUI.ConsoleBuilder.exe – You can find this tool under the Admin Console installation folder   Select File –> Open –> ConnectedConsole Select View->Application Menu Items Select Connect via Windows PowerShell and right-click select Clone Now [...]

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 that we can use in Configuration Manager 2012 R2 CU4. These commands allows us easily export/import Queries from one system to another and much more. #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 CM Queries $Queries = Get-CMQuery #Total Queries [...]

Microsoft MVP Roadshow 2015 Copenhagen – Slides & Runbooks

As promised here is my slides from yesterdays MVP Roadshow in copenhagen! Will update this next week after the event in Århus!   if you are not signed up, You can still make it!  http://blogs.technet.com/b/rasmush/archive/2015/03/02/mvp-roadshow-2015.aspx Slides:   Download from here: http://www.slideshare.net/JakobGottliebSvendse/automating-system-center-2012-r2-mvp-roadshow-cph-2015   (first time i use slideshare, please comment if it is not a good idea )   See you next week Aarhus! :D

By |2015-03-17T11:24:53+01:00marts 17th, 2015|Events|Kommentarer lukket til Microsoft MVP Roadshow 2015 Copenhagen – Slides & Runbooks

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 -Name "*CT - *" -ForceWildcardHandling #CI rules with 'CT - ' keyword - 12 CIs in this example $ConfigurationItems.Count #Export out CIs with 'CT - ' keyword foreach($CI in $ConfigurationItems){ Write-Output -InputObject "Exporting out $($CI.LocalizedDisplayName) CI" Export-CMConfigurationItem -Path "$env:USERPROFILE\Desktop\CI_Rules\$($CI.LocalizedDisplayName).cab" -InputObject $CI } #New CI folder [...]

By |2015-03-16T09:50:54+01:00marts 16th, 2015|Configuration Manager (SCCM), Powershell, Scripting & Development|Kommentarer lukket til Quick intro to Configuration Items in ConfigMgr with PowerShell

Lenovo Laptop Bugs – System Update & Not Waking Up From Sleep Mode

Before we begin, I would like you to download this System Updater from Lenovo - you will have to use it later on: For Windows 7, Windows 8,  Windows 8.1 - [download id="242" format="1"]  For Windows 2000, XP and Vista - [download id="243" format="1"] If you recently bought a Lenovo computer or laptop, you might as well know some of these problems. Problem: Lenovo laptop won't wake up from sleep, there are driver problems & the Fn and CTRL are not working correctly. Let's start with the Fn & CTRL button. Most of you may have noticed that there is a problem [...]

Group Creation Tool for Operations Manager

  Most people have a love hate relationship with Groups in in Operations Manager, you cannot really avoid them but there are some catches when you begin to work with them but let me explain in short. A group is a collection of objects. They can be instances of the same class or of different classes. Groups have population criteria that define what objects are added to them. This can be a dynamic criteria that adds objects as they are discovered or explicit criteria where you manually add specific objects to the group. Groups are used to scope overrides, views, [...]

By |2015-02-28T17:12:57+01:00februar 28th, 2015|Operations Manager (SCOM)|1 Kommentar

NIC 2015 Recording Online: Service Management Automation – Introduction

The recordings from NIC 2015 is online on youtube!. Thanks NIC!   System Center - Service Management Automation - Introduction There is a new form of Automation in the Microsoft world! Service Management Automation is part of System Center Orchestrator 2012 R2 and is built on PowerShell! Get introduced, get an overview and learn how to develop and test your first Runbook Url: http://www.nicconf.com/system-center---service-management-automation---introduction Youtube url: https://www.youtube.com/watch?v=TQLaF_k-hg0 Video:   Get the slides and runbooks here: https://blog.ctglobalservices.com/jgs/nic-2015-slides-and-runbooks-from-my-sessions/

By |2017-08-22T09:25:50+01:00februar 24th, 2015|Automation, Events|Kommentarer lukket til NIC 2015 Recording Online: Service Management Automation – Introduction

NIC 2015 Recording Online: Service Management Automation – Automating System Center 2012 R2

The recordings from NIC 2015 is online on youtube!. Thanks NIC!   System Center - Service Management Automation – Automating System Center 2012 R2 Already PowerShell Scripter? Already worked with SMA? Or are you just interested in some more advanced examples of runbooks? These examples include monitors, connectors and more in demos focused on System Center. Join me for a deep dive into the world of Service Management Automation runbooks, packed with best practices, demos and notes from the real-world.   Url: http://www.nicconf.com/system-center---service-management-automation--automating-system-center-2012-r2 Youtube url: https://www.youtube.com/watch?v=rDFejEe8ruI Video:   Get the slides and runbooks here: https://blog.ctglobalservices.com/jgs/nic-2015-slides-and-runbooks-from-my-sessions/

By |2017-08-22T09:25:51+01:00februar 24th, 2015|Automation, Events|Kommentarer lukket til NIC 2015 Recording Online: Service Management Automation – Automating System Center 2012 R2

Installing and configuring a SCOM multi-homed agent with SCCM 2012 R2

(In this blogpost only handling x64 versions) I had the challenge to automatic install and configure a SCOM multi-homed agent. I ran in to a couple of issues that I had to deal with – so today I am going to share my experiences regarding this with you. First you need to copy the source files for the SCOM agent to your SCCM source files location. The next thing you need to do is to download a copy of my PowerShell script (InstallSCOMMultiHome.ps1) created for the solution and place it in the content folder mentioned before. Your content folder should [...]

Windows 10 Preview Start Menu not working in build 9926

A quick fix to the StartMenu issue in Windows 10 Technical Preview Build 9926 During deployment of your Windows 10 image, you can fix this issue by prepping the default user profile, so that all users logging on to the device will benefit from the fix. In the registry key HKEY_USERS\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced Create a REG_DWORD with the name EnableXamlStartMenu Set the value to 0 (zero) Or simply use this command to do it during a Task Sequence reg.exe add hku\.Default\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v EnableXamlStartMenu /t REG_DWORD /d 0 /f

By |2015-02-15T18:28:51+01:00februar 15th, 2015|Configuration Manager (SCCM), OS Deployment, Windows Client|Kommentarer lukket til Windows 10 Preview Start Menu not working in build 9926

Slides and links from my Welcome to your new life as an Enterprise Client Hybrid Management expert session @NIC 2015

Thanks for attending my Hybrid Management session @NIC 2015. Slide deck Deploy wifi profiles with shared secret - https://blog.ctglobalservices.com/kea/deploying-wpa-2-personal-wifi-profiles-using-configmgr-intune/ Change device ownership in configmgr - https://blog.ctglobalservices.com/kaj/change-device-ownership-in-configuration-manager-with-powershell/ Intune Extensions fail to install - https://blog.ctglobalservices.com/kea/intune-extensions-will-not-install/ and http://scug.be/sccm/2014/02/11/cm12-extensions-for-windows-intune-resources-and-gotchas/ Device based vs User based policies - https://blog.ctglobalservices.com/kea/device-based-vs-user-based-mdm-policies-in-configmgr-2012-r2/ Troubleshooting iOS certificate deployments - https://blog.ctglobalservices.com/kea/troubleshooting-certificate-deployment-on-ios-devices-with-configmgr-intune/ Deny Apps on Windows Phone - http://scug.be/nico/2014/05/22/deny-windows-phone-apps-with-configuration-manager-intune/

By |2015-02-14T15:06:32+01:00februar 14th, 2015|Configuration Manager (SCCM)|Kommentarer lukket til Slides and links from my Welcome to your new life as an Enterprise Client Hybrid Management expert session @NIC 2015

Slides and links from my Site Review session @NIC 2015

  Autmating the WSUS Cleanup process - https://blog.ctglobalservices.com/kea/house-of-cardsthe-configmgr-software-update-point-and-wsus/ SQL PowerShell audit script  http://stevethompsonmvp.wordpress.com/2014/05/19/powershell-sql-audit-script/ Splitting existing ConfigMgr database into multiple SQL files  http://myitforum.com/cs2/blogs/jnelson/archive/2009/07/27/140199.aspx Pre-creating the database before installing Configmgr – download script Multiple software upate points and shared db – http://blogs.msdn.com/b/steverac/archive/2013/02/07/configuring-multiple-software-update-points-in-a-configmgr-2012-primary-site-what-to-expect.aspx Slide deck SQL Script to for fragmentation on the SQL DB Checking the database fragmentation: Use CM_PS1 Go SELECT DB_NAME(database_id) AS [Database Name], OBJECT_NAME(ps.OBJECT_ID) AS [Object Name],     i.name AS [Index Name], ps.index_id, index_type_desc,     avg_fragmentation_in_percent, fragment_count, page_count FROM sys.dm_db_index_physical_stats(DB_ID(),NULL, NULL, NULL ,N’LIMITED’) AS ps     INNER JOIN sys.indexes AS i WITH (NOLOCK)     ON ps.[object_id] = i.[object_id] AND ps.index_id [...]

By |2015-02-14T14:51:53+01:00februar 14th, 2015|Configuration Manager (SCCM), General info|2 Comments

Slides and links from my Compliance Settings session @ NIC 2015 in Oslo

Thanks for attending another great NIC event, and a huge thank for the organization behind NIC for arranging a true International conference in Scandinavia. Some good resources for working with Compliance Settings: Henrik Hoe - https://blog.ctglobalservices.com/author/heh/ Sherry Kissinger - http://www.mnscug.org/blogs/sherry-kissinger Kent Agerlund - https://blog.ctglobalservices.com/author/kea/ Kenny Buntinx - http://scug.be/members/kenny/ Technet - https://technet.microsoft.com/en-us/library/gg681958.aspx Slides and examples

By |2015-02-14T14:46:11+01:00februar 14th, 2015|Configuration Manager (SCCM), General info|Kommentarer lukket til Slides and links from my Compliance Settings session @ NIC 2015 in Oslo

NIC 2015: Slides and runbooks from my sessions

thank you all for a great NIC 2015 ! It was great to be back for the 4th time, and had some really nice conversations with a lot of people. I have uploaded my slides and runbooks for my sessions: System Center - Service Management Automation - Introduction There is a new form of Automation in the Microsoft world! Service Management Automation is part of System Center Orchestrator 2012 R2 and is built on PowerShell! Get introduced, get an overview and learn how to develop and test your first Runbook Get the slides here: [download id="233"] Video: https://blog.ctglobalservices.com/jgs/nic-2015-recording-online-service-management-automation-automating-system-center-2012-r2/ System Center [...]

By |2017-08-22T09:25:51+01:00februar 13th, 2015|Automation, Events|Kommentarer lukket til NIC 2015: Slides and runbooks from my sessions

NIC 2015 SCOM in the perfect world (Slides)

Thank you all for participating on my sessions about the right way to a implementation with SCOM. Remember that I have a lot of scripts in my slides – so look into them – If you would like the MFI NIC 2015 MP let me know and I will mail it to you. The HW I used was a Ubiquity MFI EU mPower with 3 outlets. Have a great conference Kåre Download Powerpoint Click on me to download

By |2017-08-22T10:14:54+01:00februar 12th, 2015|Events, Operations Manager (SCOM)|1 Kommentar

Grey Agents in SCOM

If you still have those old Windows 2003 and 2008 pre R2 servers around, and you have a SCOM Agent on those, it could be - they are all in a grey state. One reason could be the Advisor/OpsInsights Connector - Currently the Advisor Intelligence MPs are running PS scripts against Windows without PS. Fix: Override the Healthservice with a disable for those servers in a grey state (2003/2008) More info: https://social.technet.microsoft.com/Forums/en-US/cee7736b-f119-4d6a-ad81-18b3d9f7f4a9/grey-agents-after-new-management-pack-with-idmicrosoftintelligencepackstypes?forum=operationsmanagergeneral See you

By |2015-02-10T08:29:38+01:00februar 10th, 2015|Operations Manager (SCOM)|Kommentarer lukket til Grey Agents in SCOM

SCSM 2012: Custom Forms – Simple way to lock controls in Edit mode (Only using XAML)!

A decent part of my work is in customizing Service Manager. Last year i was contributing author on the Service Manager 2012 Unleashed book, specifically writing chapters about customization (together with Kurt Van Hoecke) The chapter 23 talks about creating your own forms in Service Manager. Get the book here: http://www.amazon.com/System-Center-Service-Manager-Unleashed/dp/067233707X/ref=sr_1_1?ie=UTF8&qid=1422965008&sr=8-1&keywords=service+manager   In this article I want to show how you in a very easy way can disable controls, based on if it is a new object (creation) or existing object (editing). I have specifically used this method to lock the field that is the key. In this case I [...]

By |2015-02-03T13:13:36+01:00februar 3rd, 2015|Service Manager (SCSM)|1 Kommentar

I am speaking at System Center Universe Europe 2015!

I am proud to present that I will be speaking at System Center Universe Europe 2015! There is already a great list of speakers! http://www.systemcenteruniverse.ch/speakers.html   When August 24-26 2015 Where Congress Center Basel Messeplatz 21 4058 Basel Switzerland   Expect automation at it’s best! Looking forward!

By |2015-02-03T12:09:46+01:00februar 3rd, 2015|Automation, Events|Kommentarer lukket til I am speaking at System Center Universe Europe 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 Remove-CMDeploymentTypeDependency Remove-CMDeploymentTypeDependencyGroup Remove-CMDeploymentTypeSupersedence Remove-CMQuery Set-CMDeploymentTypeDependency Set-CMDeploymentTypeDependencyGroup Set-CMDeploymentTypeSupersedence Set-CMQuery Sync-CMMigrationSource   Happy Scripting! :)

Deploying WPA-2 personal WIFI profiles using ConfigMgr & Intune

For hybrid environments (that being ConfigMgr integrated with Microsoft Intune), it’s not possible to deploy a WIFI profile using a pre-shared secret in the UI. This will however not prevent you from creating and deploying WPA-2 Personal security WIFI profiles in the console. You will just be deploying the WIFI profile without the WIFI password.  Windows Phone 8.1 will re-apply the same profile over and over again When users receive the WIFI profile all they have to do is add the password and they will have WIFI connection. This works great for Android and iOS, but not for Windows Phone [...]

By |2015-01-28T14:28:20+01:00januar 28th, 2015|Configuration Manager (SCCM)|4 Comments

Automation / SCO / SCSM Tip: Always retry when trying to update an items or any other action in external systems (how to use looping)!

In my work on automating system center service manager, I have learned my lessons! On my blog i want to share bits of my experiences so that hopefully you do not hit the same issues in your automation.   TIP! Always retry your actions when trying to update an item in service manager and it is always a good idea to think about retried when connecting to any system! cloud or on-prem!   Why? you might ask In this case it is about the  dreadful service manager error message for “The item has been changed by another user or process. [...]

By |2017-08-22T09:25:51+01:00januar 15th, 2015|Automation, Service Manager (SCSM)|Kommentarer lukket til Automation / SCO / SCSM Tip: Always retry when trying to update an items or any other action in external systems (how to use looping)!