Table of Contents
Module: SubNetwork
Gets the number of addresses in a network.
Measure-NetworkAddresses
[[-Mask] {syntax-ipab}]
[-Assignable]
[<CommonParameters>]
Measure-NetworkAddresses
[[-Bits] <int>]
[-Assignable]
[<CommonParameters>]
The Measure-NetworkAddresses
function gets the number of network addresses that are available in a given network.
Example 1. Get the number of network addresses in a given network mask
[UInt32] $Addresses = Measure-NetworkAddresses -Mask 255.250.0.0
Example 2. Get the number of assignable network addresses in a network with a given number of network bits
[UInt32] $Addresses = Measure-NetworkAddresses -Assignable -Bits 24
Specifies a network mask.
Type |
byte[], IPAddress, IpAddressBits, string, or UInt32 |
---|---|
Position |
0 |
Default Value |
None |
Accept Pipeline Input |
True |
Accept Wildcard Characters |
False |
Specifies the network mask bits.
Type |
|
---|---|
Position |
0 |
Default Value |
None |
Accept Pipeline Input |
True |
Accept Wildcard Characters |
False |
Specifies that addresses should be limited to those assignable (not network or broadcast).
Type |
|
---|---|
Position |
Named |
Default Value |
None |
Accept Pipeline Input |
False |
Accept Wildcard Characters |
False |