question

surya1509 avatar image
0 Votes"
surya1509 asked LimitlessTechnology-2700 answered

Ad Existing virtual network and subnet to Keyvault using powershell

Hello ,
I am able to successfull create a key vault using below azure cli command
az keyvault create --name $kvname --resource-group $rgname --location $location --enable-soft-delete true

I have a business case to add existing virtual network and subnet using private endpoint to out new key vault using CLI command . I didnt find any command that does this , could anyone please let me know if we can achieve this using powershell or azure cli?

windows-server-powershellazure-key-vault
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

How about Add-AzKeyVaultNetworkRule or Update-AzKeyVaultNetworkRuleSet

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered

Hi @surya1509 ,

if you are looking for the AZ CLI command please take a look here:
https://docs.microsoft.com/en-us/cli/azure/keyvault/network-rule?view=azure-cli-latest


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello Surya,

In order to work on the AZ CLI command, do have a look at the below link, which will be helpful to you

https://docs.microsoft.com/en-us/cli/azure/keyvault/network-rule?view=azure-cli-latest


Do follow the below link for a better understanding,

https://docs.microsoft.com/en-us/azure/key-vault/general/how-to-azure-key-vault-network-security?tabs=azure-powershell


Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.