Basic Powershell example

<#
.SYNOPSIS
   Shows when last your PC started up.
.DESCRIPTION
   This is a WMI wrapper function to get the time that your PC last started up.
.PARAMETER
   ComputerName The name of the Computer you want to run the command against.
.EXAMPLE
   Get-LastBootTime -ComputerName localhost
.NOTES
   Notes notes notes
.LINK
   https://vollett.net/?p=315 #>

param(
[Parameter(Mandatory=$true)][string]$ComputerName
)

Get-WmiObject -Class Win32_OperatingSystem -ComputerName $ComputerName |
Select-Object -Property CSName,@{n=”Last Booted”;
e={[Management.ManagementDateTimeConverter]::ToDateTime($_.LastBootUpTime)}}