-
Notifications
You must be signed in to change notification settings - Fork 560
[Bug] Stop-ADTServiceAndDependencies ignore -ErrorAction SilentlyContinue #1334
Copy link
Copy link
Closed
Labels
Type: Issue / BugSomething isn't working as expectedSomething isn't working as expected
Description
Prerequisites
- Ensure you write a short, descriptive title after [Bug] above.
- Make sure to search for any existing issues before filing a new one.
- Verify you are able to reproduce the issue with the latest released version
PSAppDeployToolkit version
4.0.5
Describe the bug
If a service is NOT available, an error occurs with the following command although ‘-ErrorAction SilentlyContinue’ is specified.
Stop-ADTServiceAndDependencies -Service 'ServiceName' -ErrorAction SilentlyContinue
Normally I would expect the script to simply continue with ‘-ErrorAction SilentlyContinue’ (SilentlyContinue or Ignore).
Instead, PSADT cancels completely and returns ERROR 60001
Steps to reproduce
Use Stop-ADTServiceAndDependencies -Service 'ServiceName' -ErrorAction SilentlyContinue and an non existing service
Environment data
OsName : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-Bit
WindowsVersion : 2009
WindowsProductName : Windows 10 Enterprise
WindowsBuildLabEx : 26100.1.amd64fre.ge_release.240331-1435Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: Issue / BugSomething isn't working as expectedSomething isn't working as expected
