Commit c18d0251 authored by Joe Fitzgerald's avatar Joe Fitzgerald
Browse files

Fixing path to script, correcting file encoding

parent 3bbc129d
...@@ -16,18 +16,18 @@ function Check-ContinueRestartOrEnd() { ...@@ -16,18 +16,18 @@ function Check-ContinueRestartOrEnd() {
Check-WindowsUpdates Check-WindowsUpdates
if (($global:MoreUpdates -eq 1) -and ($script:Cycles -le $global:MaxCycles)) { if (($global:MoreUpdates -eq 1) -and ($script:Cycles -le $global:MaxCycles)) {
Stop-Service $script:ServiceName -Force Stop-Service $script:ServiceName -Force
Set-Service -Name $script:ServiceName -StartupType Disabled Status Stopped Set-Service -Name $script:ServiceName -StartupType Disabled -Status Stopped
Install-WindowsUpdates Install-WindowsUpdates
} else { } else {
Write-Host "Done Installing Windows Updates" Write-Host "Done Installing Windows Updates"
Set-Service -Name $script:ServiceName -StartupType Automatic Status Running Set-Service -Name $script:ServiceName -StartupType Automatic -Status Running
} }
} }
1 { 1 {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry $prop = (Get-ItemProperty $RegistryKey).$RegistryEntry
if (-not $prop) { if (-not $prop) {
Write-Host "Restart Registry Entry Does Not Exist - Creating It" Write-Host "Restart Registry Entry Does Not Exist - Creating It"
Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\vagrant\scripts\Install-WindowsUpdates.ps1" Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install-win-updates.ps1"
} else { } else {
Write-Host "Restart Registry Entry Exists Already" Write-Host "Restart Registry Entry Exists Already"
} }
...@@ -159,7 +159,7 @@ $script:Cycles = 0 ...@@ -159,7 +159,7 @@ $script:Cycles = 0
$script:ServiceName = "sshd" $script:ServiceName = "sshd"
Stop-Service $script:ServiceName -Force Stop-Service $script:ServiceName -Force
Set-Service -Name $script:ServiceName -StartupType Disabled Status Stopped Set-Service -Name $script:ServiceName -StartupType Disabled -Status Stopped
Check-WindowsUpdates Check-WindowsUpdates
if ($global:MoreUpdates -eq 1) { if ($global:MoreUpdates -eq 1) {
Install-WindowsUpdates Install-WindowsUpdates
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment