azure-activedirectory-powershell
azure-activedirectory-powershell copied to clipboard
Not working with PowerShell 7.0.0-rc.1
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'.
Confirmed this is still an issue in GA release of PS 7.0
Same here. Still the same issue
Same with PowerShell 7.0.2 and AzureADPreview 2.0.2.102
https://github.com/PowerShell/PowerShell/issues/10473
Same issue on PS 7.1.1
Same with PS 7.1.3
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
Still an issue, PS 7.2.1 Can we bring AzureAD out of the dark ages with some .NET/PS Core support?