Why/How is ManagedPipelineMode a different type when Getting vs Setting?
Use the following values: 0 = Integrated; 1 = Classic
Set-ItemProperty "IIS:\AppPools\MyAppPool" "managedPipelineMode" "1"
Try using
Set-ItemProperty -Path:'IIS\AppPools\MyAppPool' -Name:'managedPipelineMode' -Value:Classic
Note the lack of quotation marks on Classic
Notes:I prefer to call argument names specifically so there is no confusion later, and if they update/change the command, wierd stuff doesn't happen
I also use the colon binding operator. This makes it absolutely clear that the value belongs to an argument of that name.