How to Set a Timeout in PowerShell

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

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.

Advertisement

Step 1

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

Video of the Day

Step 2

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

Advertisement

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.

Advertisement

Advertisement

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.

Video of the Day

Advertisement

Advertisement

references