Syntax error in disable_shitty_service()
This commit is contained in:
parent
cca4844e6a
commit
d89c1717c7
1 changed files with 3 additions and 2 deletions
|
@ -167,7 +167,8 @@ function remove_provisioned_shitty_modern_app {
|
|||
Write-Host -ForegroundColor Green "done"
|
||||
}
|
||||
|
||||
function disable_shitty_service ([string]$name){
|
||||
function disable_shitty_service {
|
||||
param([string]$name)
|
||||
Write-Host -NoNewline "`t$name : "
|
||||
$serv = Get-Service -name $name
|
||||
if ( !$serv) {
|
||||
|
@ -178,7 +179,7 @@ function disable_shitty_service ([string]$name){
|
|||
Write-Host -ForegroundColor Yellow "already disabled"
|
||||
}
|
||||
else {
|
||||
service Stop-Service -InputObject $serv -PassThru | Set-Service -StartupType disabled
|
||||
Stop-Service -InputObject $serv -PassThru | Set-Service -StartupType disabled
|
||||
Write-Host -ForegroundColor Green "done "
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue