I am trying to copy an existing IIS 7.5 application pool using the WebService Powershell module without stopping the application.
When I copy the application pool when I start and load the application, I get a NullReferenceException.
$pool = 'app1-0' $newpool = 'app1-1' cp "iis:/apppools/$pool" "iis:/apppools/$newpool" -force
Output:
Copy-Item : Object reference not set to an instance of an object.
If I stop the pool or start the application pool and do not download the application, the copy command will complete successfully.
With the exception of copying properties one by one, is there a way to copy / clone a running and loaded application pool?
source share