This cmdlet creates a new virtual subnet in a virtual network, or updates a virtual subnet in a virtual network
Networking / Security · Risk: High · Documentation Verified
Last verified: 2026-10-26
Microsoft NetworkController reference: This cmdlet creates a new virtual subnet in a virtual network, or updates a virtual subnet in a virtual network 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-NetworkControllerVirtualSubnet. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / NetworkController · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-CertificateThumbPrint
Specifies the digital public key X.509 certificate of a user account that has permission to perform this action. This is the certificate thumbprint of the certificate. This thumbprint must also be provided in the ClientCertificateThumbprint parameter in the Install-NetworkController or Set-NetworkController cmdlet so that Network Controller can authorize this user.
-Confirm
Prompts you for confirmation before running the cmdlet.
-ConnectionUri (required)
Specifies the Uniform Resource Identifier (URI) of the Network Controller, used by all Representational State Transfer (REST) clients to connect to Network Controller.
-Credential
Specifies a user credential that has permission to perform this action. The default value is the current user.This user must be present in the security group provided in the ClientSecurityGroup parameter in the Install-NetworkController cmdlet.
-Etag
Specifies the entity tag (ETag) parameter of the resource. An ETag (entity tag) is an HTTP response header returned by an HTTP-compliant web server used to determine change in the content of a resource at a given URL. The value of the header is an opaque string representing the state of the resource at the time the response was generated.
-Force
Forces the command to run without asking for user confirmation.
-PassInnerException
This thumbprint must also be provided in the ClientCertificateThumbprint parameter in the Install-NetworkController or Set-NetworkController cmdlet so that Network Controller can authorize this user. The thumbprint must be provided only if the network controller client authentication is X509 certificates. Get-NetworkController retrieves that client authentication and authorization information.
-Properties (required)
A virtual subnet can take the following properties as inputs a. Access control list for the subnet b. Address prefix of the subnet c. IP configuration d. Route table for all user defined routes e. Service insertion rules
-ResourceId (required)
Specifies the ID of the virtual subnet
-ResourceMetadata
This parameter contains metadata information for the client, such as the tenant ID, group ID, and resource name.
-VirtualNetworkId (required)
Specifies the virtual network where the virtual subnet belongs
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Prerequisites
Windows with the NetworkController 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.
Description The above cmdlet creates a virtual subnet with an address prefix of 24.30.1.0/24 in a virtual network called Contoso. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.