Skip to content

Uptime and Restarts

Pode internally keeps track of the uptime of the server, as well as the number of times the server has been restarted.


There are two uptime stats in Pode, and both will be returned to you in milliseconds:

  1. The uptime for the server since the last restart
  2. The total uptime of the server regardless of restarts

To get either, you can use the Get-PodeServerUptime function. For the total uptime, just supply the -Total switch:

$current = Get-PodeServerUptime
$total = Get-PodeServerUptime -Total

Restart Count

Pode keeps track of how many time your server restarts, you can get this count by using the Get-PodeServerRestartCount function:

$count = Get-PodeServerRestartCount