Automatically install Group Managed Service account and create Docker credential spec file

This script was created to to perform automated installations of gMSA (Group Managed Service Accounts) on servers that are allowed to use such accounts. A gMSA is protected so that only members of a specific domain group or assigned computer accounts can install the account and retrieve the password. You define such restrictions during the […]

Continue reading

Gather list of RD sessions from registered servers through the RD Connection Broker

This script was created to output information regarding users that are logged onto the various Remote Desktop farms that are deployed within the organization. This helps with migrations from one environment (2008) to another (2016) due to the information gathered from Active Directory. The script has been tested on both environments running on Windows Server […]

Continue reading

Install pending Windows updates deployed through SCCM (Configuration Manager) on a client

I created this script which includes various functions because sometimes there is a pending update left on the system after the update deployment has finished. Imagine a server that performs updates within a maintenance window and this server performs a reboot after installation. Sometimes one of the updates is left in a pending state and […]

Continue reading

Gather Auto Deployment Rules from Configuration Manager

I created this function to provide information to our team regarding the status of the Auto Deployment Rules (ADR) that have been created. This in combination with other code can be used to create mails to the team that outline the status of the various ADRs that have been running including for example the downloaded […]

Continue reading

Gather Active Directory account information using ADSI

I created this function because sometimes you don’t have the Active Directory PowerShell module installed on your system. This function works on various Operating Systems such as Windows 7, 8.x, 10 and also on Server 2008 and higher. It is ideal to include in login scripts or startup scripts to gather information about the current […]

Continue reading

Show all SCCM collection members

This function is just a standard function to gather the collection members for the specified collection and return this in the output. The output can be used for further functionality or just to show which and how many members there are within the collection. The Full parameter just selects all fields from the Site Server […]

Continue reading

Display a Maintenance Window for an SCCM Collection

This function is based on the original code from Nickolaj Andersen that you can find here GitHub Get-MaintenanceWindows.ps1 however I have modified this to allow for Verbose output and to specify the day, month and year for which you want to determine the Maintenance Window. In addition since I work a lot with non-recurring Maintenance […]

Continue reading

Remove a Maintenance Window from a specified SCCM Collection

This function removes a Maintenance Window from a collection based on either the provided name or ServiceWindowSchedules ID that you can see when performing a WMI query for collection information. You can also provide an asterisk in the name to indicate a wildcard is used to identify a set of Maintenance Windows should you use […]

Continue reading

Function to create and set a Maintenance Window on a specified SCCM Collection

This function creates a new Service Window/Maintenance Window for a Configuration Manager collection all using WMI but does require the other previously posted functions in order to perform as expected. This prevents the need to use the other functions separately to create the Maintenance Window and performs a verification once the Maintenance Window has been […]

Continue reading

Set Maintenance Window on an SCCM Collection using PowerShell

This function creates a new Service Window/Maintenance Window for a Configuration Manager collection all using WMI so you do not need the Configuration Manager cmdlets which sometimes can be frustrating to use. This function requires a schedule token as input which can be created using the New-ScheduleToken function. The base code of this function can […]

Continue reading