Invoke-RemoteLogoff.ps1
function Invoke-RemoteLogoff { <# .SYNOPSIS Short Description .DESCRIPTION Detailed Description .EXAMPLE Invoke-RemoteLogoff explains how to use the command can be multiple lines .EXAMPLE Invoke-RemoteLogoff another example can have as many examples as you like #> [CmdletBinding()] param ( [Parameter(Mandatory=$false, Position=0)] [Object] $computer = (Read-Host 'Target to force logoff on?') ) (gwmi win32_operatingsystem -ComputerName $computer).Win32Shutdown(4) } |