Tag Archives: IIS

Internet Information Services

PowerShell quickie: Setting IIS App Pool IdleTimeout

I just did this and was frankly awash in a sea of misinformation, so here’s how it’s done.

What are the gotchas here?

Well one, just calling Set-ItemProperty does nothing but apply your change to an in-memory copy of the object. Not the object itself. Forget that solution

Second, you need to pass in a timespan object, not merely a straight number, or you’ll get unexpected results when it tries to set the timeout in ticks

Third: Do not forget the Set-Item call, or you’re utterly lost.

And that’s about it.

[update: I forgot to say, include:

Import-Module WebAdministration

At the start. I don't have to, because my servers ipmo that module in their PowerShell profiles. But you'll need to.]