0 votes

I have a PowerShell script that ran fine on my old computer (Windows 10, VSCode, Powershell 7). After changing hardware, moving to Windows 11, and re-installing, the script is not working.

I am calling Import-Module Adaxes at the top of the script. I have tried using the following line (because I'm prior to Adaxes 2025) and also without.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

The error: When I call:

$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"

I get the following error:

 118 |  $ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
     |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling ".ctor" with "0" argument(s): "Could not load type 'System.Runtime.Remoting.Channels.IChannel' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral,
     | PublicKeyToken=b77a5c561934e089'."

.NET 4.8 is installed.
Any ideas on how to resolve this error?

ago by (70 points)
0

Hello,

For troubleshooting purposes, please post here or send us at support@adaxes.com the following details:

  • A screenshot of the Multi-server environment dialog. The dialog displays how many Adaxes services you have and what their versions are. For information on how to view it, see https://www.adaxes.com/help/MultiServerEnvironment.
  • The version and the build number of the Windows operating system installed on the computer where the Adaxes service runs.
  • The version of PowerShell where the script is executed.
0

The original attempts were using PowerShell 7.4.7.

I later found that this error does not occur when running in PowerShell 5.x (using Powershell ISE).

The documentation here seems to indicate that the Adaxes PowerShell Module should work in both versions. It does not indicate a limitation for the ADSI model, but it would seem that there is.

The reason I am using the ADSI was specifically because I need to modify the M365properties for applying user licenses. I did not find equivalent functionality using the PS module.

Versions in use: Adaxes Release: 2023.3 Product version: 3.16.23410.0 Windows 11: 26100.4061 PowerShell within VSCode: 7.4.7

1 Answer

0 votes
ago by (15.7k points)

Hello,

Thank you for the provided details. Unfortunately, Adaxes 2023.2 does not support connections from external PowerShell 7 instances. The possibility was added in Adaxes 2025.1. For details, have a look at the corresponding section of the following What’s New article: https://www.adaxes.com/info_whats-new_2025.1.htm#powershell_7_support.

Related questions

0 votes
1 answer

Since adaxes does not support powershell 5.1 and we make use of snapins for Exchange Management Tools we are considering rolling back to 2023.2. In the changelog there is no ... any issue to roll back until we figure out a way to manage the hybrid environment?

asked May 23 by jdoucet (20 points)
0 votes
1 answer

I used the script below to try and accomplish this but I get an error. I did try to leave a comment but it would not let me. I tried running ... .adaxes.com/script-repository/add-users-located-in-particular-organizational-units-to-unmanaged-accounts-s178.htm

asked Nov 14, 2022 by raul.ramirez (210 points)
0 votes
1 answer

I am having an issue running a powershell script through Adaxes. I am trying to have this run as a business rule when ... $optoffice.DisabledServicePlans = "ONEDRIVESTANDARD" Set-MsolUserLicense -UserPrincipalName %userPrincipalName% -LicenseOptions $optOffice

asked Mar 2, 2015 by malsobrook (50 points)
0 votes
1 answer

The individualmodule for PnP if upgraded to 2.2 in non PowerShell 7 breaks in Adaxers. Previous versions of Powershell will not allow the 2.2 PnP version to connect which is ... to make this work but if it is deprecated by MS, then we will lose functionality.

asked Aug 16, 2023 by nick.boehm (20 points)
0 votes
1 answer

Hi there, we have some custom commands that need the enter-pssession with -sshtransport which is only available in PWSH7. Is it supported to install powershell7 right on the adaxes server? Kind regards, Constantin

asked Mar 3, 2022 by Constey (190 points)
3,699 questions
3,383 answers
8,549 comments
549,737 users