Skip to content

Latest commit

 

History

History
105 lines (89 loc) · 3.04 KB

Get-BroadcastAddress.adoc

File metadata and controls

105 lines (89 loc) · 3.04 KB

Get-BroadcastAddress

Module: SubNetwork

Gets the broadcast address of a sub-network.

Syntax

Get-BroadcastAddress
    [[-Address] <byte[]> | <IPAddress> | <IpAddressBits> | <string> | <UInt32>]
    [-Mask] <byte[]> | <IPAddress> | <IpAddressBits> | <string> | <UInt32>
    [<CommonParameters>]
Get-BroadcastAddress
    [[-Address] <byte[]> | <IPAddress> | <IpAddressBits> | <string> | <UInt32>]
    [-Bits] <int>
    [<CommonParameters>]

Description

The Get-BroadcastAddress function determines the broadcast address of a sub-network from an IP address within that sub-network and the information provided.

Examples

Example 1. Get the broadcast address of a given IP address with a given network mask.
Get-BroadcastAddress -Address 192.168.0.32 -Mask 255.255.255.0
Example 2. Get the broadcast address of a given IP address with a given number of network bits.
Get-BroadcastAddress -Address 192.168.0.32 -Bits 24

Parameters

-Address

Specifies an IP address within the sub-network.

Type

Position

0

Default Value

None

Accept Pipeline Input

True

Accept Wildcard Characters

False

-Mask

Specifies the network mask.

Type

Position

1

Default Value

None

Accept Pipeline Input

False

Accept Wildcard Characters

False

-Bits

Specifies the network mask bits.

Type

int

Position

1

Default Value

None

Accept Pipeline Input

False

Accept Wildcard Characters

False

Inputs

You can pipe a string, byte[], UInt32, IPAddress object, or IpAddressBits object to this function.

Outputs

This function returns an IPAddressBits. This object will coerce neatly to a string.