Set-Service <name> -StartupType AutomaticDelayedStart sets startup to Automatic
See original GitHub issuePrerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
In PowerShell 7.1.5, with admin right, calling Set-Service <name> -StartupType AutomaticDelayedStart does not result in the service getting a change in the startup type.
Expected behavior
When I visually inspect the service in the Services window, I expected to see the Startup Type listed as "Automatic (Delayed Startup)"
Actual behavior
When I visually inspect the service in the Services window, I see the Startup Type listed as "Automatic"
Error details
No errors returned
Environment data
Name Value
---- -----
PSVersion 7.1.5
PSEdition Core
GitCommitId 7.1.5
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:21
Top Results From Across the Web
Set service StartType to Automatic - Delayed
Using Set-Service , I'm able to change the StartType of my services between the accepted values of Boot, System, Automatic, Manual, Disabled ....
Read more >change service startup type - Microsoft Q&A
Set-Service -Name "Service name" -StartupType AutomaticDelayedStart. Refer to the following guide: Create and run PowerShell scripts from the ...
Read more >Set-Service (Microsoft.PowerShell.Management)
The StartupType parameter sets the service to Automatic. Get-Service uses the Name parameter to specify the BITS service and sends the object down...
Read more >Set service startup mode to Automatic (Delayed Start) with ...
Automatic (Delayed Start ) is a new service startup mode that is available from Windows Vista onward. This startup type allows you to...
Read more >Set-Service and AutomaticDelayedStart option : r/PowerShell
I am trying to do something like this: Get-Service -Name MSSQLSERVER | Set-Service -StartupType AutomaticDelayedStart.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, the executing account has local admin rights and the script runs elevated, and the service is set up to log on as that account.
Can you verify that -StartupType Automatic and AutomaticDelayedStart gives different results in the Services window list? For me, it appears that both set it to just Automatic.
This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.