How to Set a Timeout in PowerShell

By Greg Lindberg

When you are the administrator of a server, use the Microsoft Windows PowerShell command prompt feature to determine specific connections settings for host computers. For example, control and monitor sessions between the server and client using the WSMan settings. Set new rules, such as the timeout limit, to determine how long a session may be idle before being stopped completely.

Step 1

Click the "Start" button from the desktop and then click the "All Programs" option.

Step 2

Click the "Accessories" option and then click the "Windows PowerShell" option. The PowerShell program launches on your screen.

Step 3

Enter "Dir WSMan:\localhost\shell" into the command line and then press the "Enter" key on your keyboard.

Step 4

View the list of configuration settings and look for the "IdleTimeout" field.

Step 5

Enter "Set-Item WSMan:\localhost\shell\IdleTimeout" into the command line, and then press the "spacebar" key.

Step 6

Enter the number, in milliseconds, that determines how long a session is disconnected before it is disregarded.

Step 7

Press the "Enter" key and then the new timeout setting is configured.