This avoids using get-localgroupmembers, which gives errors when there are 'bad' records in the group # Purpose : Add and/or remove members from local administrators group # Application: Add a domain group to the local admins group - REQ3084421 CHG0268600 # Author : Roger C 3-Jun-2018 / 2022-12-28 # Usage: use this in a baseline … Continue reading Enforce correct members of local administrators group
SCCM
Communicate with SCCM server to launch an SCCM script against a computer, and get the results from the computer
Invoke an SCCM script against a machine, and provide the response from the machine
Use Powershell to create a desktop icon
Create a desktop shortcut and assign an icon
Reading a script from SCCM Script
When you want to read the script contained within a CM script, you will find the SCRIPT field is encoded and unreadable.
Clean up finished installations
Go through a device collection folder, find all the Success or Already Present status devices, and remove them from the collection.
Given an application name, return systems that have not completed deployment
/* Return a list of systems that have not completed deployment of a given application */ Declare @Title varchar(max) -- application title Set @Title='%(SEP)%5323%' select VRSV.Netbios_Name0 as 'Netbios Name' , vAA.CollectionName as 'Target Collection' , Vaa.ApplicationName as 'Application Name' , VADTDRPC.Descript as 'Deployment Type' , VCI.LastEnforcementMessageTime --, VCI.LastErrorCode --, VADTDRPC.AppEnforcementState ,case when VADTDRPC.AppEnforcementState = 1000 … Continue reading Given an application name, return systems that have not completed deployment
Create collections for stressed systems
This routine maintains and populates SCCM collections for stressed out systems. Missing from AD, No client, missing from DNS,failed Ping. Defines Populate-SCCM_Collections_Distressed_Clients # \\l-pc0zu0eh\c$\Users\rcossaboom\Documents\scripts\Projects\Disabled Systems collection\Populate-SCCM_Collections_Distressed_Clients 2019-08-28A.ps1 # Program: Populate-SCCM_Collections_Distressed_Clients.ps1 # Author: Roger C 2019-08-20 # Version: 1.0.0.0 # Purpose: Update members of SCCM collections for various failures # Requirements: Must have access to Configuration … Continue reading Create collections for stressed systems