I am trying to disable Public Network Access of Azure Data Factory through az powershell. As per Microsoft documentation, there is a property called PublicNetworkAccess. So I tried below commands,
Import-Module Az.DataFactory
Set-AzDataFactoryV2 -PublicNetworkAccess 'Disabled' -Force
Could anyone please guide me?
My end goal is to achieve below configuration in Azure Data Factory (Connect via Private Endpoint):




You need to pass
DataFactoryName,ResourceGroupName,locationto theSet-AzDatatFactoryV2cmdlet in order to disable the public Network Access on the Data Factory.We have tested the below PowerShell cmdlet, and we are able to disable the public Network Access on Data Factory.
Here is the Sample Output screenshot for reference: