Networking / Security · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft NetTCPIP reference: Creates and configures an IP address. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for New-NetIPAddress. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / NetTCPIP · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-AddressFamily
Specifies an IP address family. The cmdlet creates an IP address for the family. If you do not specify this parameter, the property is automatically generated. The acceptable values for this parameter are: - IPv4 - IPv6
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
-Confirm
Prompts you for confirmation before running the cmdlet.
-DefaultGateway
Specifies the IPv4 address or IPv6 address of the default gateway for the host. Default gateways provide a default route for TCP/IP hosts to use when communicating with other hosts on remote networks.
-IPAddress (required)
Specifies the IPv4 or IPv6 address to create.
-InterfaceAlias (required)
Specifies an alias of a network interface. The cmdlet creates an IP address for the alias.
-InterfaceIndex (required)
Specifies an index of a network interface. The cmdlet creates an IP address for the index.
-PolicyStore
Specifies a PolicyStore value. The acceptable values for this parameter are: -- ActiveStore. The IP address information is valid. -- PersistentStore. The computer saves IP address information across restarts. When the computer restarts, it copies the saved settings to the ActiveStore. The default value is ActiveStore. Specify ActiveStore only. If you do not specify this parameter, the default entries are created in both the ActiveStore and the PersistentStore.
-PreferredLifetime
Specifies a preferred lifetime, as a TimeSpan object, for an IP address. To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
-PrefixLength
Specifies a prefix length. This parameter defines the local subnet size, and is also known as a subnet mask.
-SkipAsSource
Indicates whether an address is a primary IP address. 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.
-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.
-Type
Specifies an IP address type. The acceptable values for this parameter are: -- Unicast -- Anycast The default value is Unicast.
-ValidLifetime
Specifies a valid lifetime value, as a TimeSpan object, for an IP address. To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the NetTCPIP module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
The first command adds a new IPv4 address to the network interface at index 12. The *PrefixLength* parameter specifies the subnet mask for the IP address. In this example, the *PrefixLength* of 24 equals a subnet mask of 255.255.255.0. When you add an IPv4 address, the address specified for the Default Gateway must be in the same subnet as the IPv4 address that you add. The second command removes the IPv4 address. To remove the IPv4 address, use the Remove-NetIPAddress cmdlet. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.