-
-
Save DiHo78/43b8939c0c8f8da21af8b29a60e597c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#'CNAME/Alias erstellen | |
#''''''''''''''''''''''''' | |
# install-module dnsserver | |
<# Reminder | |
https://docs.microsoft.com/en-us/powershell/module/dnsserver/?view=win10-ps | |
DnsServer Module can be obtained either by installing DNS Server role or adding the DNS Server Tools part of Remote Server Administration Tools (RSAT) feature. | |
#> | |
$domain = 'domain.local' | |
$AliasName = 'SQL-MyApp.domain.local' | |
$targetServer = 'MyTgtServer' | |
$target = $targetServer + '.' + $domain | |
$target | |
$DNSSrv = 'MyDNS.Domain.local' | |
Add-DnsServerResourceRecordCName -Name $AliasName -HostNameAlias $target -ZoneName $domain -Verbose -ComputerName $DNSSrv -WhatIf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment