Home » Scripting »

Watch out when using $PSModuleAutoLoadingPreference = “none” in a PS Remote Session in Windows Server 2016

Recently I discovered a change in the default behavior of PSRemoting Sessions in Windows Server 2012 R2 vs. Server 2016. I was migrating a script from 2012R2 to 2016 and surprisingly, I got this error:   The term ‘Get-Date’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check […]

Category: Operating Systems, Powershell, Scripting  |  Comment

VIP Users Part 2 or how to synchronize group membership from AD to SCSM

Dealing with VIP users is a common practice within Service Management. This old blogpost explains a very good approach to mark VIP users in SCSM as VIP users. We simply extend the User class with an extra boolean property (true/false) and we then expose that property on the Incident right under the Affected User. That […]

Category: Powershell, Service Management Automation, Service Manager  |  2 Comments

ConfigMgr 1604 new cmdlets

Microsoft released a new set of command-lets for Configuration Manager and all these new cmdlets are also included in the ConfigMgr 1605 TP release. Here are all the new cmdlets: cmdlet Category Notes Get-CMWindowsServicingPlan Software Updates Windows 10 Servicing New-CMWindowsServicingPlan Software Updates Windows 10 Servicing Add-CMServiceConnectionPoint Infrastructure Set-CMServiceConnectionPoint Infrastructure Remove-CMServiceConnectionPoint Infrastructure Get-CMServiceConnectionPoint Infrastructure Remove-CMCertificateRegistrationPoint Infrastructure […]

Category: Configuration Manager, Powershell, Scripting  |  2 Comments

Azure PowerShell: How to assign access to a subscription using PowerShell (RBAC)

I had this question from a customer recently, and when I searched the net I wouldn’t find any specific examples. This example assigns a user as a Contributor to the subscription. When you assign roles to resources, all you need is the URL for the resource and provide it to this cmdlet. Here you go: […]

Category: Microsoft Azure, Powershell  |  Comment

FTP / SFTP monitor for SCOM

In this post we’ll make a script for a FTP / SFTP monitor that can monitor the FTP/SFTP status, by doing the following operations: -Log in -Upload a file -Download a file -Delete the file Since Powershell doesn’t have any built-in ftp support I was looking for some alternatives, and since I use WinSCP normally […]

Category: Home, Operations Manager 2012 R2, Powershell, SCOM, Scripting  |  5 Comments

Silent install Java 8 Update 71 and 72 with SCCM

In my last post about silent / unattended installation of Java 8 Update 66, we followed the new guidelines for how to install Java 8 silently by Oracle. The problem with that method is that it works when you try to run your script locally with administrator privileges it will work fine, but when you […]

Category: Configuration Manager, Home, Scripting, Software distribution, Software Updates, Tips and tricks, Windows Installer / MSI  |  16 Comments

December 16th: Create Hyper-V guests that starts specific Task Sequence using PowerShell

How do you automatically create a Hyper-V guest that start a specific MDT task Sequence.

Category: Hyper-V, MDT, OS Deployment, Powershell  |  Comment

Roll Out New Configuration Manager Distribution Point with PowerShell

Here is a quick example how to install new Configuration Manager Distribution Point with PowerShell. As you see we have many options to expand this script. We can install Windows Server features, reboot it remotely, install additional software etc. It all depends how you wanna install and configure it. #Import the Module Import-Module $env:SMS_ADMIN_UI_PATH.Replace("\bin\i386","\bin\configurationmanager.psd1") $SiteCode […]

Category: Configuration Manager, Configuration Manager 2012, Configuration Manager 2012 R2, Configuration Manager 2012 SP1, Configuration Manager R3, Powershell, Scripting  |  4 Comments

December 2nd: Part 2: Uninstall Java (or any other software) with ConfigMgr Compliance Baselines

It’s December 2nd and Christmas is just around the corner! Yesterday Jakob kicked off the Coretech December Calendar with a great post about “Triggering a webhook from a SharePoint workflow using Out-of-the-box Activities” (Check out his blog post here: http://bit.ly/1N16fte).  That was the  first, this is the second post in the Coretech blog series that will continue […]

Category: Compliance Baselines, Compliance Items, Configuration Manager, Configuration Manager 2012, Configuration Manager 2012 R2, Configuration Manager 2012 SP1, Powershell, Scripting, Tips and tricks  |  6 Comments

Part 1: Uninstall Java (or any other software) with ConfigMgr Compliance Baselines

Compliance Items and Compliance Baselines in ConfigMgr is so powerful! And with some PowerShell magic you can almost use it to do anything you like on a Windows based computer – Only your imagination that will be the showstopper! Here I will show how you can uninstall software using WMI and Compliance Items in SCCM. […]

Category: Compliance Baselines, Compliance Items, Config Mgr. SP2, Config Mgr. Tools, Configuration Manager 2012, Configuration Manager 2012 R2, Configuration Manager 2012 SP1, Powershell, Software distribution, Tips and tricks  |  8 Comments