Skip to content

Commit

Permalink
Merge pull request #53 from ActiveDirectoryManagementFramework/develo…
Browse files Browse the repository at this point in the history
…pment

1.13.98
  • Loading branch information
FriedrichWeinmann authored Sep 27, 2023
2 parents aa31041 + d28627a commit 3375b95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ADMF/ADMF.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ADMF/changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions ADMF/functions/Set-AdmfContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 3375b95

Please sign in to comment.