'Any PowerShell to enable/disable Azure Synapse Workspace Public network access to workspace endpoints?

After going through the Microsoft documentation I haven't been able to find a way to automate the changing public network access settings for Azure Synapse. Any help would be amazing. I have seen it's possible for SQL servers and even ADF v2, so I believe there should also be availability for Synapse but nothing really I could find. Any help would be great, Joao



Solution 1:[1]

To achieve the above requirement below is the workaround you may try:

AFAIK,When we enabled managed virtual network meanwhile Public network access to be enabled automatically.

we can use the PowerShell cmdlts to create managed Virtual network for azure Synapse.

az synapse workspace create `
  --name $workspaceName `
  --resource-group $resourceGroupName `
  --storage-account $storageAccountName `
  --file-system $FileShareName `
  --sql-admin-login-user $sqlUserName `
  --sql-admin-login-password $sqlPassword `
  --location $regionName `
  --enable-managed-virtual-network true `//enabled managed virtual network
  --allowed-tenant-ids "Contoso"

enter image description here

For more information please refer the below links:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AjayKumarGhose-MT