I was trying to set IIS
properties for my DefaultAppPool
via PowerShell
and I end up with a really curious case:
- Get-ItemProperty is case insensitive.
- Set-ItemProperty is case sensitive.
Does someone know why we have this curious behaviour?
PS C:\Windows\system32> Import-Module WebAdministration
PS C:\Windows\system32> Get-ItemProperty -Path "IIS:\AppPools\DefaultAppPool" -Name Recycling.periodicRestart.privateMemory
...
Value : 27
PS C:\Windows\system32> Set-ItemProperty -Path "IIS:\AppPools\DefaultAppPool" -Name Recycling.periodicRestart.privateMemory -Value 10
PS C:\Windows\system32> Get-ItemProperty -Path "IIS:\AppPools\DefaultAppPool" -Name Recycling.periodicRestart.PrIVATeMemory
...
Value : 10
PS C:\Windows\system32> Set-ItemProperty -Path "IIS:\AppPools\DefaultAppPool" -Name Recycling.periodicRestart.PRIvateMemory -Value 15
PS C:\Windows\system32> Get-ItemProperty -Path "IIS:\AppPools\DefaultAppPool" -Name Recycling.periodicRestart.PrivateMemory
...
Value : 10 #should be 15 if case insensitive...