I have a Powershell script that gets uptime from servers that I pieced together from bits and pieces from written code on the net. What I have works great, however I've been asked to modify it for some output based on how long the servers have been up.
Here is what I've been asked to add to the script:
An "if" statement to check if the $UptimeSeconds variable is less than 600 to Write-output the value "rebooted" and and if $UptimeSeconds is greater than 2592000 (30 days) to Write-output "rebootneeded"
I appreciate any help I can get. I'm just leaning Powershell and am digging in where I can.