Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring IIS application pool settings using PowerShell

Tags:

powershell

iis

I'm trying to set the value of Enable32BitApplication and LoadUserProfile of an IIS app pool to True using PowerShell by running the following Cmdlets:

(Get-IISAppPool -Name DefaultAppPool).enable32BitAppOnWin64 = $True
(Get-IISAppPool -Name DefaultAppPool).ProcessModel.LoadUserProfile = $True

When I retrieve these values using PowerShell, it looks like the Cmdlets have run successfully, but when I try to check it in the GUI, I can note that it did not work. That's why I tried to test the website of the application pool in action, and I figured out that these Cmdlets does not work. Can anyone help me with the right PowerShell Cmdlets?

like image 213
Krank Avatar asked Jun 07 '26 08:06

Krank


1 Answers

In order for it to work by modifying the object returned by Get-IISAppPool you have to call Start-IISCommitDelay prior to changing the values and then Stop-IISCommitDelay after making the changes. So in your case it'd be:

Start-IISCommitDelay
(Get-IISAppPool -Name DefaultAppPool).enable32BitAppOnWin64 = $True
(Get-IISAppPool -Name DefaultAppPool).ProcessModel.LoadUserProfile = $True
Stop-IISCommitDelay
like image 122
Joseph Avatar answered Jun 08 '26 21:06

Joseph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!