Sometimes it happens that a SCCM Task Sequence is hanging. You can stop it with this lines of code:
this days I had an issue, where a registry key was missing after a reboot. the registry key was created by an third party software and was needed by an other software part to function well. I created the registry key manually using Powershell or the Registry Editor, and the registry key wasn’t removed. My … Read More “Volatile Registry Keys” »
if you need to change the assignement of a SCOM gateway to another SCOM gateway, you can do this by this script: please note, that this script will remove the old assignement and clean up the state directory. if you don’t cleanup the state directory, the agent will after a service restart be assigned again … Read More “change SCOM agent assignement to other SCOM gateway” »
sometimes you need to remove a file from GIT. when it contains sensitive datas like passwords, it needs to be removed from the GIT history to: this commands helped me to do this:
this days, I updated Service Management Automation (SMA) in our production environment from version 2016 UR7 to version 2019. after the update, I had an issue with Windows Azure Pack, which couldn’t display the dashboard for the Automation provider. after some research, i found out, that the root cause was some months earlier. we have … Read More “Windows Azure Pack doesn’t show Automation dashboard after updating SMA” »
since version 1906 SCCM supports role-based access control (RBAC) for folders. This can be configured trough the SCCM console or (recommended) PowerShell. unfortunattely the current version of the commandlet Get-CMObjectSecurityScope doesn’t support any folder as InputObject. so, if you want to know, which Security Scope is allowed to see a folder, you have to use … Read More “getting Security Scopes of SCCM folder” »
if you write regularly PowerShell modules, you have to test the functions in it. i wrote some Pester tests, which are doing this tests for all functions in a PowerShell module: the function has SYNOPSIS, DESCRIPTION and EXAMPLES the function has cmdletbinding the function has an OutputType defined the function name starts with an approved … Read More “Pester tests for PowerShell modules” »
The Invoke-CMScript cmdlet invokes a PowerShell script in Microsoft System Center Configuration Manager. System Center Configuration Manager has an integrated ability to run Powershell scripts. The scripts simplify building custom tools to administer software and let you accomplish mundane tasks quickly, allowing you to get large jobs done more easily and more consistently. For more information, see Create … Read More “pass parameter values to Invoke-CMScript” »
PowerShell is now available in Azure Function App (still in preview). you can create a Powershell Function App like this: using PowerShell modules currently, you can’t install a powershell module inside Azure Function App, but you can upload your module to the script directory and access it from there. to do this, use Kudu: … Read More “PowerShell and PSHTML in Azure Function App” »
i work in a multi domain environment. each domain has different password expiration rules. unfortunattely there is no notification system for the password expiration, so i have to check manually how long my passwords are valid. for this, i wrote this PowerShell function, which does work without the use of any additional module: function get-UserPwdInfo … Read More “getting info about users password expiration” »