Get-Service Ignore common errors by jborean93 · Pull Request #24245 · PowerShell/PowerShell
iSazonov
added
the
CL-General
label
Sep 5, 2024Ignore common errors when attempting to retrieve some properties for a service like the Description, UserName, StartupType. These properties are not critical for using a service object or to retrieve other information like the name and whether a service exists or not and by emitting an error record it could fail a script if it did not expect an error. Instead if the service failed to retrieve the property due to permissions or other environmental problems, it will set the affected properties to $null.
Sysoiev-Yurii pushed a commit to Sysoiev-Yurii/PowerShell that referenced this pull request
May 12, 2025This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters