Setting IIS config via appcmd.exe for Load User Profile
If you want to Purely use PowerShell
you can use the following PowerShell
command to change the 'Load User Profile' propertie of an application pool.
Import-Module WebAdministrationSet-ItemProperty "IIS:\AppPools\YourAppPoolName" -Name "processModel.loadUserProfile" -Value "False"
Try this with quotes.
c:\windows\system32\inetsrv\appcmd.exe set config -section:applicationPools "/[name='accountsmanagement.example.com'].processModel.loadUserProfile:false"
Instead of using appcmd.exe set config
you can also use the following
appcmd.exe set apppool "App Pool name here" -processmodel.loaduserprofile:"true"
To show all values that can be set use
appcmd.exe set apppool "App Pool name here" /?