< Back
Set-NsxDns
Post
NAME Set-NsxDns
SYNOPSIS
Configures an NSX DNS.
SYNTAX
Set-NsxDns [-DNS] <XmlElement> [-Enabled] [-DNSServer <IPAddress[]>] [-CacheSize <Int32>] [-EnableLogging]
[-LogLevel <String>] [-Connection <PSObject>] [<CommonParameters>]
DESCRIPTION
An NSX Edge Service Gateway provides all NSX Edge services such as firewall,
NAT, DHCP, VPN, load balancing, and high availability.
The NSX Edge DNS add DNS server (relay) on the Edge
This cmdlet sets the basic DNS configuration of an NSX Edge.
PARAMETERS
-DNS <XmlElement>
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Enabled [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-DNSServer <IPAddress[]>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CacheSize <Int32>
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-EnableLogging [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-LogLevel <String>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Connection <PSObject>
PowerNSX Connection object
Required? false
Position? named
Default value $defaultNSXConnection
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -Enabled
Enabled the DNS server on ESG
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -Enabled:$false
Disabled the DNS server on ESG
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -DNSServer 192.0.2.2
Set the DNS Server to 192.0.2.2
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -CacheSize 32
Change DNS Cache Size to 32 (Mb)
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxLoadBalancer | Set-NsxDNS -EnableLogging
Enabled DNS traffic logs.
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxLoadBalancer | Set-NsxDNS -LogLevel debug
Choose the log level (emergency, alert, critical, error, warning, notice, info, debug)
of DNS logs.
RELATED LINKS
SYNOPSIS
Configures an NSX DNS.
SYNTAX
Set-NsxDns [-DNS] <XmlElement> [-Enabled] [-DNSServer <IPAddress[]>] [-CacheSize <Int32>] [-EnableLogging]
[-LogLevel <String>] [-Connection <PSObject>] [<CommonParameters>]
DESCRIPTION
An NSX Edge Service Gateway provides all NSX Edge services such as firewall,
NAT, DHCP, VPN, load balancing, and high availability.
The NSX Edge DNS add DNS server (relay) on the Edge
This cmdlet sets the basic DNS configuration of an NSX Edge.
PARAMETERS
-DNS <XmlElement>
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Enabled [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-DNSServer <IPAddress[]>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CacheSize <Int32>
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-EnableLogging [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-LogLevel <String>
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Connection <PSObject>
PowerNSX Connection object
Required? false
Position? named
Default value $defaultNSXConnection
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -Enabled
Enabled the DNS server on ESG
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -Enabled:$false
Disabled the DNS server on ESG
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -DNSServer 192.0.2.2
Set the DNS Server to 192.0.2.2
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxDns | Set-NsxDns -CacheSize 32
Change DNS Cache Size to 32 (Mb)
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxLoadBalancer | Set-NsxDNS -EnableLogging
Enabled DNS traffic logs.
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>Get-NsxEdge Edge01 | Get-NsxLoadBalancer | Set-NsxDNS -LogLevel debug
Choose the log level (emergency, alert, critical, error, warning, notice, info, debug)
of DNS logs.
RELATED LINKS