Hi.
I can use Get-AzureKeyVaultSecret, but when I try Get-AzureKeyVaultCertificate I get this error:
Invoke-Expression : The term ‘Get-AzureKeyVaultCertificate’ is not recognized
October 18th 2016 14:26:36Error
as the name of a cmdlet, function, script file, or operable program. Check the
October 18th 2016 14:26:36Error
spelling of the name, or if a path was included, verify that the path is
October 18th 2016 14:26:36Error
correct and try again.
October 18th 2016 14:26:36Error
At C:\Octopus\Work\20161018122546-88\Octopus.AzureContext.ps1:49 char:2
October 18th 2016 14:26:36Error
Invoke-Expression ". $OctopusAzureTargetScript
October 18th 2016 14:26:36Error
$OctopusAzureTargetScriptParamet …
October 18th 2016 14:26:36Error
October 18th 2016 14:26:36Error
October 18th 2016 14:26:36Error
+ CategoryInfo : ObjectNotFound: (Get-AzureKeyVaultCertificate:St
October 18th 2016 14:26:36Error
ring) [Invoke-Expression], CommandNotFoundException
October 18th 2016 14:26:36Error
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co
October 18th 2016 14:26:36Error
mmands.InvokeExpressionCommand
Any ideas why only one of them is working. I would assume that either would both fail or none. I have no problem using the same commandlets on the VM Octopus is running on.
Do you know part of what module is Get-AzureKeyVaultCertificate? I could find some traces of the cmdlet around the web, but every time I reach to a list of Azure Key Vault cmdlets, that one doesn’t show up on the list: https://msdn.microsoft.com/library/azure/dn868052(v=azure.98).aspx
If you have that cmdlet working on anothre machine, try checking to which module it belongs there.
Are you running this script on a regular “script step” on a Tentacle? Or are you running this from Octopus on the Octopus Server machine?
It’ll ultimately depend on whether that module is installed or not on the machine running the script. So you might wanna try installing it manually and see if that works.
That seems to be it, yeah. You can always use a custom Calamari build that includes the module version you need until we release a new version with the latest Azure module.