Skip to content

Instantly share code, notes, and snippets.

Last active Sep 27, 2020
What would you like to do?
#'CNAME/Alias erstellen
# install-module dnsserver
<# Reminder
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
$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