Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
9d3e8b8504
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  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."