#320: Add DomainName param to New-NSXTSegment

Allows end user to specify the DNS domain name for the network segment
This commit is contained in:
Troy Lindsay
2019-10-25 15:23:06 -05:00
parent e33fdc3453
commit ae16ef6e52

View File

@@ -159,6 +159,7 @@ Function New-NSXTSegment {
[Parameter(Mandatory=$True)]$Name,
[Parameter(Mandatory=$True)]$Gateway,
[Parameter(Mandatory=$False)]$DHCPRange,
[Parameter(Mandatory=$False)]$DomainName,
[Switch]$DHCP,
[Switch]$Troubleshoot
)
@@ -179,6 +180,11 @@ Function New-NSXTSegment {
display_name = $Name;
subnets = @($subnets)
}
if($DomainName) {
$payload.domain_name = $DomainName
}
$body = $payload | ConvertTo-Json -depth 4
$method = "PUT"