Skip to content

Get-Service & Set-Service: StartType & StartupType #9923

@NeoBeum

Description

@NeoBeum

EDIT: Pending Review for Pull Request: #9940

Summary of the new feature/enhancement

Get-Service returns Property "StartType"
Set-Service sets property "StartupType" and also "StartType"

Proposed technical implementation details (optional)

Create Alias for Set-Service to accept "StartType" as an argument.
This improves flow with property fields. (.. something that is lacking with WMI Objects and MSFT_Disks).

Get-Service sshd | Select *

Name                : sshd
RequiredServices    : {}
CanPauseAndContinue : False
CanShutdown         : False
CanStop             : True
DisplayName         : OpenSSH SSH Server
DependentServices   :
MachineName         : .
ServiceName         : sshd
ServicesDependedOn  : {}
ServiceHandle       : SafeServiceHandle
Status              : Running
ServiceType         : Win32OwnProcess
StartType           : Automatic
Site                :
Container           :

Invalid Command

Set-Service sshd -StartType Manual
Set-Service : A parameter cannot be found that matches parameter name 'StartType'.

Valid Command

Set-Service sshd -StartupType Manual   

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or more

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions