Skip to content

ActiveDirectory module does not work over remoting in PS 7.6 #27199

@Tadas

Description

@Tadas

Prerequisites

Steps to reproduce

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

Expected behavior

Get an AD object back

Actual behavior

> 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.

Error details

Environment data

> $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

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions