diff --git a/Check_scripts/Win - Automatic Services and remidiation.ps1 b/Check_scripts/Win - Automatic Services and remidiation.ps1 index d51efa8..8e59379 100644 --- a/Check_scripts/Win - Automatic Services and remidiation.ps1 +++ b/Check_scripts/Win - Automatic Services and remidiation.ps1 @@ -25,11 +25,17 @@ .CHANGELOG 24-06-2022 - Initial script. 26-06-2022 - Added remediation to start stopped services + 03-02-2025 - Changed the services lookup to allow wildcards #> #region Parameters, functions and global variables - $VAR_Excludes = "edgeupdate","RemoteRegistry","sppsvc","MapsBroker","gupdate","TrustedInstaller" - $Services = Get-Service | Where-Object { $_.Name -notin $VAR_Excludes -and $_.StartType -eq "Automatic" -and $_.Status -ne "Running" } + $VAR_Excludes = @("edgeupdate","RemoteRegistry","sppsvc","MapsBroker","gupdate","TrustedInstaller","GoogleUpdater*") + + $Services = Get-Service | Where-Object { + ($_.Name -notmatch ($VAR_Excludes -join "|")) -and + ($_.StartType -eq "Automatic") -and + ($_.Status -ne "Running") + } #endregion #region script if (!($Services)) {