I am using let's encrypt certificate and azure key vault to automate renewal process using this repo: https://github.com/brent-robinson/posh-acme-azure-example
I have installed the module Az.KeyVault using yaml on azure devops pipeline:
# Install the Az PowerShell modules our script will need
- task: PowerShell@2
displayName: Install PowerShell Modules (Az.Accounts, Az.KeyVault, Az.Resources, Posh-ACME)
inputs:
targetType: 'inline'
script: 'Install-Module Az.Accounts, Az.KeyVault, Az.Resources, Posh-ACME -Force'
errorActionPreference: 'stop'
failOnStderr: true
pwsh: true
But, when I run the script, getting the below error:
The 'Get-AzKeyVaultCertificate' command was found in the
| module 'Az.KeyVault', but the module could not be loaded. For
| more information, run 'Import-Module Az.KeyVault'.
When I try to add the import module (Import-Module -Name Az.KeyVault -Force
) it's giving the below error:
Assembly with the same name is already loaded