Group Managed Service Accounts (gMSA) are an awesome way to have Active Directory taking care of password changes for the service accounts. How to create Group Managed Service Accounts and how to assign them to Windows services you will find plenty of articles and blog posts on the internet. Group Managed Service Accounts solve you […]
PowerShell
PowerShell – Hash Table Get That Value
When writing scripts I like to use PowerShell ISE or VSCode a lot. It simplifies a lot of your daily scripting tasks like IntelliSense or Snippets. But sometimes these little helper don’t tell always the truth. Why? Well, I show you an example which is quite common. On problem there is if you are working […]
PowerShell – Create a Credential Object with NULL Password
In one of my automation tasks I had the need to create a credential object with a $null password – an empty / NULL password. One easy way to do is, create just instantiate a new secure string object using the new() constructor from the .Net class like this: or using New-Object cmdlet like this […]
PowerShell – Create “Clean” Custom Objects From DataTable Object
I recently had a need to create “clean” PowerShell custom objects out of a DataTable object. What does that mean? Well, let me explain. When you try to get data out of SQL Server using PowerShell there are many ways to do it. Either you use Invoke-SQLCmd, SQL Server PowerShell (SQLPS), SQL Server Management Objects […]
PowerShell – Comparing Management Pack Version
I bumped into an interesting problem while writing a custom PowerShell module. The module should compare the management packs from a SCOM management group and some local repository. If the local repository has a higher version number than the currently installed management pack, the script should import the management pack into SCOM. This post should […]
PowerShell – Convert Special Character String Into Numbers
Do you know the situation where you have to handle strings / string data that has a lot of complex characters? In certain situation it is just a pain to deal with strings that have special characters like “*ç%&/()=`è or even an entire Export-CliXML output content. Recently I had the need to embed such data […]
SCOM 2016 – Start-SCOMAgentMaintenanceMode PowerShell Way
In SCOM 2016 there is a new way to set maintenance mode on your agent machine itself. Microsoft released a module to set the maintenance mode on the agent server itself. It uses a library (MaintenanceMode.dll) to set maintenance mode parameters on your monitored server. This DLL can be found in the C:\Program Files\Microsoft Monitoring […]
SCOM – Editing SPN Quickly
If you are dealing with SCOM, you know that there is a lot to install and configure before it runs smoothly. One step during the installation process, is to configure the SPN (Service Principal Names) in Active Directory. In fact you need to set SPNs per SCOM management server and if you are hosting the […]
SCOM / SCSM – Retrieve Decrypted RunAs Account Credentials
I am not sure if you have seen it, but Richard Warren from nccgroup has figured out, how to decrypt the RunAs account credentials in SCOM. The problem up to now was, that there was no official way to retrieve the encrypted credentials from SCOM. There is just one DLL to use, which offers the […]
WAP – Get Windows Azure Pack Websites via PowerShell
Windows Azure Pack was Microsoft’s first attempt to bring Azure into your on-premise datacenter. The things you can do with it are limited to IaaS VM, PaaS databases and PaaS websites. In addition there is Service Bus and some networking part which is necessary for the IaaS / PaaS services. Of course there are other […]