Get-NetIPAddress cmdlet

Spread the words

The Get-NetIPAddress cmdlet gets the IP address configuration (IPV4 and IPV6).

getnetipaddress

Parameters:

  • AddressFamily (IPV4, IPV6)

Only show specified IP families.

addressfamily

  • AddressState (Invalid, Tentative, Duplicate, Deprecated, Preferred)

Use this parameter to filter the output based on addresses that are valid and available for use.

addressstate

  • AssociatedIPInterface (CimInstance)

This parameter specifies an IP interface.

  • CimSession

This parameter runs the cmdlet in a remote session or on a remote computer.

cimsession

  • IncludeAllCompartments

This parameter indicates that the cmdlet includes addresses from all configured network compartments.

includeallcompart

  • InterfaceAlias

The cmdlet gets IP addresses that match the aliases.

interfacealias

  • InterfaceIndex

The cmdlet gets IP addresses that match the indexes.

interfaceindex

  • IPAddress

The parameter specifies the IP address.

ipaddress

  • PolicyStore (ActiveStore, PersistentStore)
  • PreferredLifetime
  • Prefixlength

This parameter defines the local subnet mask

prefixlength

  • PrefixOrigin (Manual, WellKnown, DHCP, RouterAdvertisement)

prefixorigine

  • SkipAsSource

This parameter identifies the primary IP address for outgoing traffic in a multiple IP address scenario. If this parameter is set to true, the addresses are not used for outgoing traffic and are not registered in DNS.

  • SuffixOrigin (Manual, WellKnown, DHCP, Link, Random)

suffixorigin

  • ThrottleLimit
  • Type (Unicast, Anycast)

type

  • ValidLifetime

Outputs:

The output type is the type of the objects that the cmdlet emits.

Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_NetIPAddress

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after pound sign (#) provides the namespace and the class name for the underlying WMI object.

Examples:

ex1

ex2

The following example gets information about IP configuration for IP addresses that have an infinite ValidLifetime.

ex3

Be the first to comment on "Get-NetIPAddress cmdlet"

Leave a comment

Your email address will not be published.


*