浏览代码

Added Function CheckInstallService

Richard Newton 6 年之前
父节点
当前提交
69246b9cc2
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Windows10SysPrepDebloater.ps1

+ 8 - 0
Windows10SysPrepDebloater.ps1

@@ -209,6 +209,14 @@ Function CheckService {
         Start-Service -Name dmwappushservice }
         Start-Service -Name dmwappushservice }
 }
 }
 
 
+Function CheckInstallService {
+
+  Param([switch]$Debloat)
+  
+  If (Get-Service -Name InstallService | Where-Object ($_.Status -eq "Stopped"}) {
+      Start-Service -Name InstallService
+      Set-Service -Name InstallService -StartupType Automatic
+
 Write-Output "Initiating Sysprep"
 Write-Output "Initiating Sysprep"
 Begin-SysPrep
 Begin-SysPrep
 Write-Output "Removing bloatware apps."
 Write-Output "Removing bloatware apps."