Executing the same single command to create an application pool takes significantly longer to complete when ran in ISE or through Remote PowerShell when compared to just executing it in the powershell.exe command prompt.
I've seen it take up to 70 seconds to complete this simple command, at the same time when using the IIS GUI I can create an application pool while the other script is running in the background taking forever.
Any ideas?
PowerShell.exe:PS C:\> $t = measure-command { New-WebAppPool test8.com } PS C:\> $t Days : 0 Hours : 0 Minutes : 0 Seconds : 3 Milliseconds : 517 Ticks : 35177074 TotalDays : 4.07142060185185E-05 TotalHours : 0.000977140944444444 TotalMinutes : 0.0586284566666667 TotalSeconds : 3.5177074 TotalMilliseconds : 3517.7074
ISE:PS C:\> $t = measure-command { New-WebAppPool test9.com } PS C:\> $t Days : 0 Hours : 0 Minutes : 0 Seconds : 21 Milliseconds : 121 Ticks : 211213212 TotalDays : 0.000244459736111111 TotalHours : 0.00586703366666667 TotalMinutes : 0.35202202 TotalSeconds : 21.1213212 TotalMilliseconds : 21121.3212