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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.