diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bd1de8..3204b79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 64387f3..8db7349 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -3,7 +3,7 @@ on: [pull_request] jobs: validate: - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v1 diff --git a/DCManagement/DCManagement.psd1 b/DCManagement/DCManagement.psd1 index 5d49ce5..56ab907 100644 --- a/DCManagement/DCManagement.psd1 +++ b/DCManagement/DCManagement.psd1 @@ -3,7 +3,7 @@ RootModule = 'DCManagement.psm1' # Version number of this module. - ModuleVersion = '1.2.25' + ModuleVersion = '1.2.26' # ID used to uniquely identify this module GUID = '998b2262-9b38-4b54-8ce6-493a00d70b03' @@ -26,7 +26,7 @@ # Modules that must be imported into the global environment prior to importing # this module RequiredModules = @( - @{ ModuleName = 'PSFramework'; ModuleVersion = '1.6.198' } + @{ ModuleName = 'PSFramework'; ModuleVersion = '1.13.416' } # Additional Dependencies, cannot declare due to bug in dependency handling in PS5.1 # @{ ModuleName = 'ResolveString'; ModuleVersion = '1.0.0' } diff --git a/DCManagement/changelog.md b/DCManagement/changelog.md index 18f58e6..29aa426 100644 --- a/DCManagement/changelog.md +++ b/DCManagement/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 1.2.26 (2025-10-31) + +- Upd: Access Rules - Use the shared managed remoting feature, allowing configuring session options. + ## 1.2.25 (2021-07-13) - Upd: Test-DCShare - added message tag DCTarget to allow message level modifiers to raise per-server processing messages. diff --git a/DCManagement/functions/AccessRules/Invoke-DCAccessRule.ps1 b/DCManagement/functions/AccessRules/Invoke-DCAccessRule.ps1 index 711457d..873d8f1 100644 --- a/DCManagement/functions/AccessRules/Invoke-DCAccessRule.ps1 +++ b/DCManagement/functions/AccessRules/Invoke-DCAccessRule.ps1 @@ -197,7 +197,7 @@ if (-not $psSessions[$testItem.Server]) { - try { $psSessions[$testItem.Server] = New-PSSession -ComputerName $testItem.Server @psCred -ErrorAction Stop } + try { $psSessions[$testItem.Server] = New-AdcPSSession -ComputerName $testItem.Server @psCred -ErrorAction Stop } catch { Stop-PSFFunction -String 'Invoke-DCAccessRule.Access.Error' -StringValues $testItem.Server -Target $testItem -Continue -EnableException $EnableException -ErrorRecord $_ } } $psSession = $psSessions[$testItem.Server] diff --git a/DCManagement/functions/AccessRules/Test-DCAccessRule.ps1 b/DCManagement/functions/AccessRules/Test-DCAccessRule.ps1 index afde4b5..16c6ef7 100644 --- a/DCManagement/functions/AccessRules/Test-DCAccessRule.ps1 +++ b/DCManagement/functions/AccessRules/Test-DCAccessRule.ps1 @@ -284,7 +284,7 @@ } Write-PSFMessage -String 'Test-DCAccessRule.Processing' -StringValues $domainController.Name -Target $domainController.Name -Tag DCTarget - try { $psSession = New-PSSession -ComputerName $domainController.Name @psCred -ErrorAction Stop } + try { $psSession = New-AdcPSSession -ComputerName $domainController.Name @psCred -ErrorAction Stop } catch { Stop-PSFFunction -String 'Test-DCAccessRule.PSSession.Failed' -StringValues $domainController.Name -EnableException $EnableException -Cmdlet $PSCmdlet -Continue -Target $domainController.Name -ErrorRecord $_ } $accessConfigurations = Get-DCAccessRule | Where-Object { $_.ServerRole -eq 'ALL' -or