GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add NetFramingBase to TPA for AD module compat by jborean93 · Pull Request #113 · PowerShell/PowerShell-Native

Conversation

@jborean93

@jborean93 Jordan Borean (jborean93) commented Jun 3, 2026

Copy link
Copy Markdown

Adds System.ServiceModel.NetFramingBase to the list of Trusted Platform Assemblies so that a PSSession instance can load that assembly by name. The ActiveDirectory module uses this assembly and without this change it will fail to import into a PowerShell 7 configuration endpoint.

FIxes: PowerShell/PowerShell#27199

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov and daxian-dbw reacted with thumbs up emoji Tadas and S-dn-Y reacted with hooray emoji
All reactions
  • 👍 2 reactions
  • 🎉 2 reactions
@jborean93
Add NetFramingBase to TPA for AD module compat
5cbce34
Adds System.ServiceModel.NetFramingBase to the list of Trusted Platform
Assemblies so that a PSSession instance can load that assembly by name.
The ActiveDirectory module uses this assembly and without this change it
will fail to import into a PowerShell 7 configuration endpoint.
@jborean93

Jordan Borean (jborean93) commented Jun 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

It looks like this is a transitive dependency of System.ServiceModel.NetTcp. The PR PowerShell/PowerShell@e069c1d updated System.ServiceModel.NetTcp to a newer version which brought in the transitive dependency of System.ServiceModel.NetFramingBase but as that was never added to the TPA it would fail to be loaded.

I have not verified but this seems to be a regression with 7.6.0 which is when the updated assembly was introduced. While not ideal, a workaround for people using Enter-PSSession to a PowerShell 7 based endpoint is to run this before importing the module

Add-Type -Path "$PSHome\System.ServiceModel.NetFramingBase.dll"

For people relying on JEA with a restricted language mode you can achieve the same thign automatically by adding this to your session configuration (.pssc) file:

@{
    ...
    AssembliesToLoad = @(
        "$PSHome\System.ServiceModel.NetFramingBase.dll"
    )
}
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Tadas

Tadas Medišauskas (Tadas) commented Jun 22, 2026 •
edited by unfurl-links Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Thanks for raising this! Hopefully it lands soon 🙏

I was testing AssembliesToLoad in the .pssc and I think $PSHome is unnecessary. As long as the entry ends with .dll then GetFileNameWithoutExtension is eventually called on it:
https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/ExecutionContext.cs#L1419

GitHub
PowerShell/src/System.Management.Automation/engine/ExecutionContext.cs at master · PowerShell/PowerShell
PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jborean93

Jordan Borean (jborean93) commented Jun 22, 2026

Copy link
Copy Markdown
Author

Thanks, I mostly added the $PSHome to remove any ambiguity and tell PowerShell to always use the dll shipped by that PowerShell version and not anything else that may be found in the environment.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Tadas

Tadas Medišauskas (Tadas) commented Jun 23, 2026

Copy link
Copy Markdown

Erm what I mean is AssembliesToLoad = @("https://google.com/obviously-this-does-not-exist/System.ServiceModel.NetFramingBase.dll") works just as well i.e. I don't think variables are being expanded or that anything else in those strings matter except for the filename.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jborean93

Jordan Borean (jborean93) commented Jun 23, 2026

Copy link
Copy Markdown
Author

Ah I see, sorry I misread your post.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Tadas

Tadas Medišauskas (Tadas) commented Aug 20, 2026

Copy link
Copy Markdown

Similarly JsonSchema.Net should also be added (noticed that Test-Json '[]' doesn't work even in 7.4)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jborean93 Jordan Borean (jborean93) mentioned this pull request Aug 31, 2026
#requires -Modules fails in Enter-PSSession remoting session (PowerShell.7 endpoint) — regression from 7.4 to 7.6 PowerShell/PowerShell#27907
Closed
5 tasks done
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Sep 16, 2026

Copy link
Copy Markdown
Member

Jordan Borean (@jborean93) Thank you for finding the root cause of PowerShell/PowerShell#27907.
There are lots of mismatches because the TPA list hasn't been updated for a very long time. Also, the TPA assemblies for 7.4, 7.5, and 7.6 versions are not the same. #115 changes from an allow-list to a deny-list, so the TPA used by pwrshplugin.dll will only include the correct TPA assemblies for that specific version.

jborean93 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jborean93 Jordan Borean (jborean93) closed this Sep 16, 2026
@jborean93
Jordan Borean (jborean93) deleted the tpa-ad-module branch September 16, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ActiveDirectory module does not work over remoting in PS 7.6

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@jborean93 @Tadas @daxian-dbw
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.