Added Function CheckInstallService

This commit is contained in:
Richard Newton 2018-11-09 16:42:31 -08:00 committed by GitHub
parent 34753740aa
commit 69246b9cc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,6 +209,14 @@ Function CheckService {
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"
Begin-SysPrep
Write-Output "Removing bloatware apps."