Add-DnsServerResourceRecordMX
DNS Cmdlet: Add-DnsServerResourceRecordMX
Syntax:
Add-DnsServerResourceRecordMX[-Name] <String> [-MailExchange] <String> [-Preference] <UInt16> [-ComputerName <String>][-TimeToLive <TimeSpan>] [-ZoneName] <String>[-AgeRecord][-AllowUpdateAny][-PassThru][-ZoneScope <String>] [-VirtualizationInstance <String>][-CimSession <CimSession[]>][-ThrottleLimit <Int32>] [-AsJob][-WhatIf][-Confirm][<CommonParameters>]
Parameters and Description:
| Parameters | Description |
|---|---|
| MailExchange (Type: String) | Specifies an FQDN value for a mailer exchanger resolving to a corresponding host (A) resource record. |
| TimeToLive (Type: TimeSpan) | Represents the Time To Live (TTL) value in seconds for a given resource record. |
| AgeRecord (Type: SwitchParameter) | Indicates that a time stamp is used by the DNS server for the resource record added by this cmdlet. |
| Preference (Type: UInt16) | Specifies a priority for the MX resource record. The value ranges from 0 to 65535. |
| AllowUpdateAny (Type: SwitchParameter) | Indicates that any authenticated user can update resource records of the same owner name. |
| ComputerName (Type: String) | Enter the IP address, FQDN, NETBIOS name, or host name of the DNS server. |
| CimSession (Type: CimSession [] ) | Helps run the cmdlet on a remote computer or session. By default, the cmdlet is run on the local computer in the current session. |
| ThrottleLimit (Type: Int32) | Specifies the number of maximum parallel operations that can be allowed to run this cmdlet. If its value is 0 or not specified, PowerShell will calculate the right throttle limit automatically. |
To know further on Add-DnsServerResourceRecordMX, please refer to this article.
Purpose of this cmdlet:
The Add-DnsServerResourceRecordMX cmdlet lets you add a Mail Exchanger (MX) resource record to a DNS zone. This record provides the mail server's name for a domain and in case there are multiple records for a domain, the order or precedence is from the least to the highest value.
Example:
Add-DnsServerResourceRecordMX -Preference 10 -Name "." -TimeToLive 01:00:00 -MailExchange "mail.abc.com" -ZoneName "abc.com"
The above command adds an MX record named RecordNameMX for the zone western.abc.com
Did you know that ADManager Plus helps you
- Generate detailed reports on user, computers, groups, OUs and more
- Generate policy-based reports such as password policies and account lockout policies
- Schedule reports to run automatically and periodically
- And more.
Download the 30-day free trial of ADManager Plus and check out the rest of the features the powerful tool offers!
Active Directory Management and Reporting Solution
ADManager Plus is a web-based tool which offers the capability to manage Active Directory attributes in bulk easily using CSV files or templates. Get built-in reports on users and export them in CSV, PDF, HTML and XLSX formats.
Unravel end-to-end Active Directory management with ADManager Plus
-
- ADManager Plus Active Directory Management & Reporting
- ADAudit Plus Hybrid AD, cloud, and file auditing and security
- EventLog Analyzer Real-time Log Analysis & Reporting
- ADSelfService Plus Self-Service Password Management
- AD360 Integrated Identity & Access Management
- Log360 Comprehensive SIEM and UEBA
- AD Free Tools Active Directory FREE Tools
