azure-activedirectory-powershell icon indicating copy to clipboard operation
azure-activedirectory-powershell copied to clipboard

Not working with PowerShell 7.0.0-rc.1

Open reikor0x opened this issue 5 years ago • 7 comments

Module installation works, but:

PS C:\Users\viscia> connect-azuread Connect-AzureAD: One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.): Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Connect-AzureAD: One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.) Connect-AzureAD: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Connect-AzureAD: One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.): Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

reikor0x avatar Jan 09 '20 11:01 reikor0x

Confirmed this is still an issue in GA release of PS 7.0

AlanMcBee avatar Mar 19 '20 22:03 AlanMcBee

Same here. Still the same issue

unkn0wn-root avatar Apr 20 '20 11:04 unkn0wn-root

Same with PowerShell 7.0.2 and AzureADPreview 2.0.2.102

https://github.com/PowerShell/PowerShell/issues/10473

felickz avatar Jun 18 '20 16:06 felickz

Same issue on PS 7.1.1

successhawk avatar Feb 04 '21 00:02 successhawk

Same with PS 7.1.3

greendx avatar Mar 17 '21 02:03 greendx

I had luck using the Windows PowerShell Compatibility feature, e.g.

Import-Module -Name 'AzureADPreview' -UseWindowsPowerShell

When the first module is imported using Windows PowerShell Compatibility feature, PowerShell creates a remote session named WinPSCompatSession that is running in a background Windows PowerShell 5.1 process. This process is created when the Compatibility feature imports the first module. The process is closed when the last such module is removed (using Remove-Module) or when PowerShell process exits.

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_windows_powershell_compatibility?view=powershell-7.1

villeodell avatar Jun 28 '21 09:06 villeodell

Still an issue, PS 7.2.1 Can we bring AzureAD out of the dark ages with some .NET/PS Core support?

znk0001 avatar Feb 16 '22 19:02 znk0001