use sc.exe instead of Set-Content (#67)

This commit is contained in:
bmc-msft 2020-10-01 15:28:15 -04:00 committed by GitHub
parent 534d99bb87
commit 5e3c79efd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,8 +44,8 @@ function Optimize-VM {
Get-AppxPackage Microsoft.549981C3F5F10 | Remove-AppxPackage
log "disable Windows Search"
sc stop "WSearch"
sc config "WSearch" start= disabled
sc.exe stop "WSearch"
sc.exe config "WSearch" start= disabled
}
function Set-SetSSHACL {