I am trying to do what is suggested in the answer here: How do I set the .NET Framework Version when using New-WebAppPool?
and using the command:
Set-ItemProperty C:\inetpub\temp\appPools\DefaultAppPool managedRuntimeVersion v4.0
I get this error however
Set-ItemProperty : Property System.String managedRuntimeVersion=v4.0 does not exist. At line:1 char:17 + Set-ItemProperty <<<< C:\inetpub\temp\appPools\DefaultAppPool managedRuntimeVersion v4.0 + CategoryInfo: ReadError: (System.String managedRuntimeVersion=v4.0:PSNoteProperty) [IOException + FullyQualifiedErrorId :SetPropertyError,Microsoft.PowerShell.Commands.SetItemPropertyCommand
I think that I loaded the Web Administration module correctly (right clicked on the taskbar icon and selected "Import System Modules" and then tried the commands in that shell) and I've also tried using the command and explicitly stating the parameters and it still occurs. Same problem happens with other properties like AutoStart.
Does anyone know what I might be doing wrong?