1

Regardless of what Script I use I can not get PowerShell 5.1 to trigger a boot on my Hyper-V Host.

I can use the solarwinds WakeonLan tool to boot the server, but I would like to find a solution that would work natively.

I tried many scripts I had found online and as a last ditch effort, I installed the "WakeOnLAN 1.0" Module but while it says it executes successfully the server does not boot

PS C:\WINDOWS\system32> Invoke-WakeOnLan 52:a4:4c:52:d7:52 -Verbose
VERBOSE: Wake-on-Lan Packet sent to 52:a4:4c:52:d7:52

What could cause the server only to boot with the SolarWinds WakeOnLan.exe but not natively in Powershell?

As it may be relevant the computer I am attempting to send the MagicPacket from is a MultiNic Machine but only 1 NIC is IP'd on the subnet of the Hyper-V server.

Other Scripts I attempted to use:

V Britt
  • 25
  • 7
  • 1
    Did you try quoting the MAC address? – Theo Mar 21 '21 at 19:59
  • Are you using Windows PowerShell (up to version 5.1) or PowerShell (Core) (v6+)? – mklement0 Mar 21 '21 at 20:18
  • 2
    @zett42, the code uses `.Split('-:')`, which works like `.Split([char[]] '-:')` (as intended) in WinPS, but like `.Split([string]'-:')` in PS Core - see the bottom section of [this answer](https://stackoverflow.com/a/41905031/45375) – mklement0 Mar 21 '21 at 21:06
  • Yes I tried both single and double quotes as well as : and - separators. PS C:\WINDOWS\system32> $PSVersionTable Name Value ---- ----- PSVersion 5.1.19041.610 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.19041.610 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 – V Britt Mar 22 '21 at 02:12

0 Answers0