Using the ADSI accelerators using PowerShell remoting causes an error “Value for dictionary entry is not specified.”

We've had an issue this week where we were trying to resolve the GUID of an organizational unit provided by the Citrix PowerShell API to its display name or distinguished name.

As we already had a PowerShell remoting session open to the Citrix server so we thought we'd use the PowerShell ADSI accelerators to get the DirectoryEntry of the OU and read the information from there.

When run locally
([adsi]'LDAP://DC=demoxenapp,DC=int').DistinguishedName

The command returns "DC=demoxenapp,DC=int"

However when run over a PowerShell remoting session you either receive no data or the following error
([adsi]'LDAP://DC=demoxenapp,DC=int')

I was expecting a DirectoryEntry to be returned however instead saw this error

Value for dictionary entry is not specified.
    + CategoryInfo          :
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException



This occurs because of the authentication double hop from your client machine to the server, and from there to a domain controller.

You'll find that if you run the command against a domain controller then the command executes correctly.

Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Windows Server 2019 desktop icons such as My Computer, Windows cannot access the specified device, path, or file.