Public/Restart-Endpoint.ps1

function Restart-Endpoint {

    <#
    .SYNOPSIS
    -Taylor Lee
    Modified 05172019
 
    .DESCRIPTION
    Sets a countdown to restart the Endpoint. The command uses a multiplier set to 1 hour.
    You can use decimals to return shorter than an hour restart times or get X hours and X minutes.
 
    .NOTES
    The parameter must be typed when entering the command and not after. If you typed the command and then entered the parameter when prompted the command will fail.
 
    When using decimal values understand that the value is multiplying against the number of seconds in an hour.
    So all multiplication needs to be done as a fraction of 1. Don't try thinking that it needs to be done against the value of 60 for seconds or hours.
    View the Examples for clarification.
 
    .EXAMPLE
    Restarts the Endpoint in 5 Hours
 
    Restart-Endpoint -Hours 5
 
    .EXAMPLE
    Restarts the Endpoint in 5 hours and 15 minutes
 
    Restart-Endpoint -Hours 5.25
 
    .EXAMPLE
    Restarts the Endpoint in 15 minutes
 
    Restart-Endpoint -Hours 0.25
 
    .Link
    Get-DCLockoutEvents2
    Get-LockedAccounts
    Get-PasswordExpired
    Unlock-Account
    Unlock-AllAccounts
    #>


    [CmdletBinding()]

    Param (
        [Parameter(Mandatory = $true)][int]$Hours
    )

    $Hoursmultiplied = $Hours * 3600

    shutdown.exe /r /t $Hoursmultiplied
}