Misc/Get-LicenseFile.ps1
function Get-LicenseFile { Param( [Parameter(Mandatory = $true)] $Publisher, [Parameter(Mandatory = $true)] $Version ) switch ($Publisher.ToUpper()) { "DTX" { $LicenseFile = Get-Secret -vaultName "NAV-X" -secretName "DtxLicenseFile" } "NAV-X" { if ($Version -eq 11 -or $Version -eq 2018) { $LicenseFile = Get-Secret -vaultName "NAV-X" -secretName "LicenseFileNAV2018" } else { $LicenseFile = Get-Secret -vaultName "NAV-X" -secretName "LicenseFile" } } "Clients First Business Solutions" { $LicenseFile = Get-Secret -vaultName "NAV-X" -secretName "CfbsLicenseFile" } default { $LicenseFile = "" } } $LicenseFile } |