Public/Invoke-WakeOnLAN.ps1
function Invoke-WakeOnLAN { <# .SYNOPSIS Sends a Wake-On-LAN packet to target computer. .PARAMETER Computer Target computer to wake up. .EXAMPLE !wake stnjn109.sunssc.local #> [PoshBot.BotCommand( CommandName = 'WOL', Aliases = ('wake', 'wakeonlan', 'wol') )] [cmdletbinding()] param( [parameter(Mandatory)] [string]$Computer ) $result = Invoke-Command -Computername pdq.sunssc.local -ScriptBlock { PDQInventory.exe WakeComputer -Computer $Using:Computer } New-PoshBotCardResponse -Type Normal -Text ($result -Join "`n") -Title "PDQ Deployment Result" } |