How can I set IIS Application Pool recycle times without resorting to the ugly syntax of Add-WebConfiguration?
I could never figure out how to set this on the object itself, but after creating it the following works:
clear-ItemProperty IIS:\AppPools\MyPoolName -Name Recycling.periodicRestart.schedule #clear values
set-ItemProperty IIS:\AppPools\MyAppPoolName -Name Recycling.periodicRestart.schedule -Value @{value="00:00:00"} #to set it to midnight