You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: functions/private/Set-WinUtilService.ps1
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,6 @@ Function Set-WinUtilService {
26
26
27
27
# Service exists, proceed with changing properties -- while handling auto delayed start for PWSH 5
28
28
if (($PSVersionTable.PSVersion.Major-lt7) -and ($StartupType-eq"AutomaticDelayedStart")) {
29
-
# Auto delayed start doesn't work with PWSH 5. That startup type is a combination of both the Automatic startup type,
30
-
# and an additional DWORD value for delayed start. That's how the SCM defines it. For this, we'll go with sc
31
-
#
32
-
# PWSH 5 uses a built-in enum for service start types: System.ServiceProcess.ServiceStartMode (https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicestartmode?view=net-10.0-pp)
33
-
# PWSH 7 uses a custom enum for service start types: Microsoft.PowerShell.Commands.ServiceStartupType (https://learn.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.servicestartuptype?view=powershellsdk-7.4.0)
34
-
#
35
-
# ---- That's why this doesn't work on the former!
0 commit comments