Skip to content

Set-Service should accept InputObject service controller #4916

Closed

Description

@kwint

Currently set-service doesn't have a InputObject parameter which accepts the System.ServiceProcess.ServiceController object, while other *-service cmdlets do.

Currently this doesn't work:

$a = Get-Service vds
set-service $a -startupType Automatic

while start-service and stop-service do work this way

$a = Get-Service vds
Stop-Service $a

and pipeline does also work
Get-Service vds | Set-Service -startupType Automatic

a work around is this:

$a = Get-Service vds
Set-Service $a.ServiceName -startupType Automatic

Activity

  1. added
    Issue-Enhancement
    Up-for-Grabs
    on Sep 25, 2017
  2. travisty- commented on Oct 5, 2017

    @travisty-
    Contributor

    It looks like -InputObject is a named parameter on Set-Service currently.

    I'm working on a fix at the moment; PowerShell Team (@PowerShell) could you assign this issue to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementResolution-FixedUp-for-GrabsWG-Cmdlets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions