Merge pull request #555 from devopscircle-io/fix-disable-internetexploreresc-error

Fix errors in Initialize-VM.ps1
This commit is contained in:
Alejandro Pauly
2020-03-16 18:25:36 -04:00
committed by GitHub
3 changed files with 17 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ $SensitiveData = @(
': ->'
)
Write-Host "Show Packer Version"
packer --version
Write-Host "Build $Image VM"
packer build -var "capture_name_prefix=$ResourcesNamePrefix" `
-var "client_id=$ClientId" `

View File

@@ -8,7 +8,13 @@ function Disable-InternetExplorerESC {
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force
Stop-Process -Name Explorer -Force -ErrorAction Continue
$ieProcess = Get-Process -Name Explorer -ErrorAction SilentlyContinue
if ($ieProcess){
Stop-Process -Name Explorer -Force -ErrorAction Continue
}
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled."
}

View File

@@ -8,7 +8,13 @@ function Disable-InternetExplorerESC {
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force
Stop-Process -Name Explorer -Force -ErrorAction Continue
$ieProcess = Get-Process -Name Explorer -ErrorAction SilentlyContinue
if ($ieProcess){
Stop-Process -Name Explorer -Force -ErrorAction Continue
}
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled."
}