Skip to content

Instantly share code, notes, and snippets.

@timgaunt
Created May 21, 2018 05:05
Show Gist options
  • Save timgaunt/028687ee6d12f779bcf870b828395dac to your computer and use it in GitHub Desktop.
Save timgaunt/028687ee6d12f779bcf870b828395dac to your computer and use it in GitHub Desktop.
Update all IIS app pools to run in 32bit mode
Import-Module WebAdministration
foreach ($webapp in Get-ChildItem -Path IIS:\AppPools\)
{
$name = "IIS:\AppPools\" + $webapp.name
$item = $item = Get-Item $name | Select -ExpandProperty enable32BitAppOnWin64
if ($webapp.enable32BitAppOnWin64 -ne 'True')
{
Set-ItemProperty -Path $name -Name enable32BitAppOnWin64 -Value True
Write-Host "$name updated to enable 32bit" -ForegroundColor Yellow
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment