Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Set-Service -Status Stopped should not prevent stopping of services without dependents only because they depend on others #5517

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

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 wuauserv

Expected 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)
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.