Register-PSSessionConfiguration -Name TestingAD # Just to be sure the endpoint is 7.6
$s = New-PSSession -ComputerName $env:COMPUTERNAME -ConfigurationName TestingAD
Invoke-Command -Session $s -ScriptBlock { Get-ADRootDSE }
# or the affected type
Invoke-Command -Session $s -ScriptBlock { [System.ServiceModel.NetTcpBinding]::new() }
# or the affected assembly itself
Invoke-Command -Session $s -ScriptBlock { [System.Reflection.Assembly]::Load('System.ServiceModel.NetFramingBase, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') }
All of these commands work interactively. I'm pretty sure it is a case of needing to update the TPA to include System.ServiceModel.NetFramingBase just like
> Invoke-Command -Session $s -ScriptBlock { Get-ADRootDSE }
Attempting to perform the InitializeDefaultDrives operation on the 'ActiveDirectory' provider failed.
Get-ADRootDSE: Could not load file or assembly 'System.ServiceModel.NetFramingBase, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
> $PSVersionTable
Name Value
---- -----
PSVersion 7.6.0
PSEdition Core
GitCommitId 7.6.0
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
All of these commands work interactively. I'm pretty sure it is a case of needing to update the TPA to include
System.ServiceModel.NetFramingBasejust likeExpected behavior
Get an AD object backActual behavior
Error details
Environment data
Visuals
No response