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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With