New-NetIPAddress cmdlet

Spread the words

This cmdlet configures an IP address.

Parameters:

  • AddressFamily (IPV4, IPV6)

It specifies the address family.

  • CimSession

It runs the cmdlet in a remote session or on a remote computer.

  • DefaultGateway

It specifies the default gateway.

  • InterfaceAlias

It specifies an interface alias. It creates an IP for the alias.

  • InterfaceIndex

It specifies an index of a network interface.

  • IPAddress

It specifies the IP address to configure.

  • PolicyStore (ActiveStore, PersistentStore)

It specifies a PolicyStore value.

  • PreferredLifetime

It specifies a preferred lifetime.

  • PrefixLength

It specifies a subnet mask.

  • SkipAsSource

This parameter identifies the primary IP address for outgoing traffic in a multiple IP address scenario.

  • ThrottleLimit
  • Type (Unicast, Anycast)
  • ValidLifeTime
  • Confirm

It prompts for confirmation before running the cmdlet.

  • WhatIf

It shows what would happen if the cmdlet runs.

Outputs:

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

Examples:

PS C:\> New-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.0.1 -PrefixLength 24 -DefaultGateway 192.168.0.254

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

Leave a comment

Your email address will not be published.


*