浏览代码

Added CheckService Functioin to start dmwappushservice if stopped

Added a function with an If statement that checks if the service dmwappushservice is running and if not then it will start it.
Richard Newton 6 年之前
父节点
当前提交
9d3e8b8504
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Windows10SysPrepDebloater.ps1

+ 7 - 0
Windows10SysPrepDebloater.ps1

@@ -201,6 +201,13 @@ Function FixWhitelistedApps {
     Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} }
 }
 
+Function CheckService {
+
+  Param([switch]$Debloat)
+  
+  If (Get-Service -Name dmwappushservice | Where-Object {$_.Status -eq "Stopped"}) {
+        Start-Service -Name dmwappushservice }
+
 Write-Output "Initiating Sysprep"
 Begin-SysPrep
 Write-Output "Removing bloatware apps."