Skip to content

Instantly share code, notes, and snippets.

View ShridharParameshwarBhat's full-sized avatar

Shridhar Parameshwar Bhat ShridharParameshwarBhat

  • Microsoft
  • REDMOND
View GitHub Profile
# Sample Script Run command (could run without escalation):
# ./RetreiveEncryptionSecretViaUrl.ps1 -secretUrl xxx -kekUrl yyy -secretFilePath Output-KEK-key -vaultrg Resource-group-of-keyvault
Param(
[Parameter(Mandatory = $true,
HelpMessage="keyvault resource group name")]
[ValidateNotNullOrEmpty()]
[string]$vaultrg,
[Parameter(Mandatory = $true,
Param(
[Parameter(Mandatory = $true,
HelpMessage="URL to the secret stored in the keyvault")]
[ValidateNotNullOrEmpty()]
[string]$secretUrl,
[Parameter(Mandatory = $false,
HelpMessage="URL to the KEK")]
[ValidateNotNullOrEmpty()]
[string]$kekUrl,