diff --git a/ADMF/ADMF.psd1 b/ADMF/ADMF.psd1 index 1fae043..716c35f 100644 --- a/ADMF/ADMF.psd1 +++ b/ADMF/ADMF.psd1 @@ -3,7 +3,7 @@ RootModule = 'ADMF.psm1' # Version number of this module. - ModuleVersion = '1.13.97' + ModuleVersion = '1.13.98' # ID used to uniquely identify this module GUID = '43f2a890-942f-4dd7-bad0-b774b44ea849' @@ -33,8 +33,8 @@ @{ ModuleName = 'Principal'; ModuleVersion = '1.0.0' } @{ ModuleName = 'ADMF.Core'; ModuleVersion = '1.1.9' } @{ ModuleName = 'DCManagement'; ModuleVersion = '1.2.25' } - @{ ModuleName = 'DomainManagement'; ModuleVersion = '1.8.198' } - @{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.56' } + @{ ModuleName = 'DomainManagement'; ModuleVersion = '1.8.199' } + @{ ModuleName = 'ForestManagement'; ModuleVersion = '1.5.66' } ) # Assemblies that must be loaded prior to importing this module diff --git a/ADMF/changelog.md b/ADMF/changelog.md index db1d0d8..b498ba5 100644 --- a/ADMF/changelog.md +++ b/ADMF/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 1.13.98 (2023-09-27) + +- Upd: Set-AdmfContext - added context name to Certificate component + ## 1.13.97 (2023-05-16) - New: Command New-AdmfContextModule - Create an ADMF Client PowerShell module. diff --git a/ADMF/functions/Set-AdmfContext.ps1 b/ADMF/functions/Set-AdmfContext.ps1 index ba4d254..b15e549 100644 --- a/ADMF/functions/Set-AdmfContext.ps1 +++ b/ADMF/functions/Set-AdmfContext.ps1 @@ -275,8 +275,8 @@ Write-PSFMessage -Level Debug -String 'Set-AdmfContext.Context.Loading' -StringValues $ContextObject.Name, 'Certificates', $file.FullName try { $jsonData = Import-PSFPowerShellDataFile -LiteralPath $file.FullName -Unsafe -ErrorAction Stop - foreach ($deletion in $jsonData.Delete) { Register-FMCertificate -Remove $deletion.Thumbprint -Type $deletion.Type } - foreach ($addition in $jsonData.Add) { Register-FMCertificate -Certificate ($addition.Certificate | ConvertFrom-PSFClixml) -Type $addition.Type } + foreach ($deletion in $jsonData.Delete) { Register-FMCertificate -Remove $deletion.Thumbprint -Type $deletion.Type -ContextName $ContextObject.Name } + foreach ($addition in $jsonData.Add) { Register-FMCertificate -Certificate ($addition.Certificate | ConvertFrom-PSFClixml) -Type $addition.Type -ContextName $ContextObject.Name } foreach ($authority in $jsonData.Authority) { Register-FMCertificate -Type $authority.Type -Authorative $authority.Authorative } } catch { @@ -297,7 +297,7 @@ default { throw "Bad filename, cannot divine certificate type: $($file.Name)" } } $cert = [System.Security.Cryptography.X509Certificates.X509Certificate2]::CreateFromCertFile($file.FullName) - Register-FMCertificate -Certificate $cert -Type $type + Register-FMCertificate -Certificate $cert -Type $type -ContextName $ContextObject.Name } catch { Clear-AdcConfiguration