I am using powershell to automate configuring websites in my IIS. I have the following code that creates a web application pool for me
#Creating a new Application Pool
New-WebAppPool "NewAppPool"
How do I go about setting the application pool identity to "Network Service" from my script ?
Please note : There is no IIS Drive on my system. And hence commands which have IIS mentioned in the path like the following fail :
Set-ItemProperty IIS:\AppPools\NewAppPool -name processModel.identityType -value 2