Last active
January 12, 2024 08:59
-
-
Save dylanberry/7cecc3007f080152aef28cdc78cc34a3 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
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[String] | |
$PrivateLinkDnsForwarderIpAddress | |
) | |
$privatelinkDomains = @("azure-automation.net", | |
"database.windows.net", | |
"sql.azuresynapse.net", | |
"sql.azuresynapse.net", | |
"dev.azuresynapse.net", | |
"azuresynapse.net", | |
"blob.core.windows.net", | |
"table.core.windows.net", | |
"queue.core.windows.net", | |
"file.core.windows.net", | |
"web.core.windows.net", | |
"dfs.core.windows.net", | |
"documents.azure.com", | |
"mongo.cosmos.azure.com", | |
"cassandra.cosmos.azure.com", | |
"gremlin.cosmos.azure.com", | |
"table.cosmos.azure.com", | |
"batch.azure.com", | |
"batch.azure.com", | |
"postgres.database.azure.com", | |
"mysql.database.azure.com", | |
"mariadb.database.azure.com", | |
"vaultcore.azure.net", | |
"managedhsm.azure.net", | |
"search.windows.net", | |
"azurecr.io", | |
"azconfig.io", | |
"servicebus.windows.net", | |
"servicebus.windows.net", | |
"azure-devices.net", | |
"servicebus.windows.net1", | |
"servicebus.windows.net", | |
"eventgrid.azure.net", | |
"eventgrid.azure.net", | |
"azurewebsites.net", | |
"api.azureml.ms", | |
"notebooks.azure.net", | |
"service.signalr.net", | |
"monitor.azure.com", | |
"oms.opinsights.azure.com", | |
"ods.opinsights.azure.com", | |
"agentsvc.azure-automation.net", | |
"blob.core.windows.net", | |
"cognitiveservices.azure.com", | |
"datafactory.azure.net", | |
"adf.azure.com", | |
"redis.cache.windows.net", | |
"redisenterprise.cache.azure.net", | |
"purview.azure.com", | |
"purviewstudio.azure.com", | |
"digitaltwins.azure.net", | |
"azurehdinsight.net", | |
"his.arc.azure.com", | |
"guestconfiguration.azure.com", | |
"media.azure.net", | |
"azurestaticapps.net", | |
"prod.migration.windowsazure.com", | |
"managedhsm.azure.net", | |
"azure-api.net", | |
"developer.azure-api.net", | |
"analysis.windows.net", | |
"pbidedicated.windows.net", | |
"tip1.powerquery.microsoft.com", | |
".botframework.com") | |
# Set the domain controller DNS conditional forwarding for the privatelink domains | |
foreach ($privatelinkDomain in $privatelinkDomains) { | |
Add-DnsServerConditionalForwarderZone ` | |
-Name $privatelinkDomain ` | |
-MasterServers [System.Net.IPAddress]::Parse($PrivateLinkDnsForwarderIpAddress) ` | |
-ReplicationScope "Domain" ` | |
-PassThru | |
} | |
Get-DnsServerZone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment