Skip to content

Instantly share code, notes, and snippets.

@killejay
killejay / RetreiveEncryptionSecretViaUrl.ps1
Last active May 4, 2021 21:35 — forked from vermashi/RetreiveEncryptionSecretViaUrl.ps1
Retrieve Encryption key via secret URL
# 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,