Skip to content

Send‑WakeOnLan

viscalyxbot edited this page Sep 15, 2025 · 1 revision

SYNOPSIS

Sends a Wake-on-LAN magic packet to wake up a remote computer.

SYNTAX

Send-WakeOnLan [-LinkLayerAddress] <String> [[-Broadcast] <String>] [[-Port] <UInt16>] [-Force]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Send-WakeOnLan command sends a Wake-on-LAN (WOL) magic packet to a specified MAC address to wake up a remote computer on the network. The magic packet is sent as a UDP broadcast packet containing the target computer's MAC address repeated 16 times, preceded by six bytes of 0xFF. The target computer must have Wake-on-LAN enabled in its BIOS/UEFI settings and network adapter configuration.

EXAMPLES

EXAMPLE 1

Send-WakeOnLan -LinkLayerAddress '00:11:22:33:44:55'

Sends a Wake-on-LAN packet to the computer with MAC address '00:11:22:33:44:55' using the default broadcast address and port.

EXAMPLE 2

Send-WakeOnLan -LinkLayerAddress '00-11-22-33-44-55' -Broadcast '192.168.1.255'

Sends a Wake-on-LAN packet to the computer with MAC address '00-11-22-33-44-55' using a specific subnet broadcast address. (Parameter has alias 'MacAddress'.)

EXAMPLE 3

Send-WOL -LinkLayerAddress '001122334455' -Port 7

Sends a Wake-on-LAN packet using the alias 'Send-WOL' to the computer with MAC address '001122334455' on port 7.

EXAMPLE 4

'00:11:22:33:44:55', '00-AA-BB-CC-DD-EE' | Send-WakeOnLan -Port 9 -Force

Sends Wake-on-LAN packets to multiple computers by passing MAC addresses through the pipeline, bypassing confirmation prompts with the Force parameter.

EXAMPLE 5

Send-WakeOnLan -LinkLayerAddress '00:11:22:33:44:55' -WhatIf

Shows what would happen if the Wake-on-LAN packet was sent without actually sending it.

PARAMETERS

-Broadcast

Specifies the broadcast address to send the Wake-on-LAN packet to. The default value is '255.255.255.255' which broadcasts to the entire local network segment.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: 255.255.255.255
Accept pipeline input: False
Accept wildcard characters: False

-Force

Overrides the confirmation dialog when sending the Wake-on-LAN packet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-LinkLayerAddress

Specifies the MAC address of the target computer to wake up. The MAC address can be provided in colon-separated (XX:XX:XX:XX:XX:XX) or hyphen-separated (XX-XX-XX-XX-XX-XX) format. This parameter accepts input from the pipeline and has an alias 'MacAddress'.

Type: String
Parameter Sets: (All)
Aliases: MacAddress

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Port

Specifies the UDP port number to send the Wake-on-LAN packet to. The default value is 9, which is the standard Wake-on-LAN port. Other commonly used ports are 0 and 7.

Type: UInt16
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 9
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

MAC address as string for pipeline input.

OUTPUTS

None. This command does not return a value.

NOTES

This command requires that the target computer has Wake-on-LAN enabled in both the BIOS/UEFI settings and the network adapter configuration. The computer must also be connected to a power source and have a network connection (wired or wireless, depending on the adapter capabilities).

RELATED LINKS

Clone this wiki locally