-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Description
Set-Service -Status Stopped not only prevents stopping services that other services depend on (.DependentServices), but, curiously, also services that themselves depend on others (.ServicesDependedOn.
For instance, the wuauserv service has no dependents, but itself depends on the rpcss service.
As an aside: Set-Service -Status Stopped lacks a -Force switch that would allow it to stop dependent services too, the way Stop-Service offers.
Steps to reproduce
Set-Service -Status Stopped wuauservExpected behavior
Given that the service has no dependents, it should be stopped.
Actual behavior
The following error occurs:
Set-Service : Cannot stop service 'Windows Update (wuauserv)' because it is dependent on other services.
...
That the service depends on other services shouldn't prevent its stopping.
Environment data
PowerShell Core 6.0.0-rc on on Microsoft Windows 7 Enterprise (64-bit; v6.1.7601)
Windows PowerShell v5.1.14409.1012 on Microsoft Windows 7 Enterprise (64-bit; v6.1.7601)Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module