I am trying to debug a powershell script in Visual Studio Code but when I try to execute connect-azuread I get this error message:
connect-azuread : The 'connect-azuread' command was found in the module 'AzureAD', but the module could not be loaded. For more information, run 'Import-Module AzureAD'.
When I try to do Import-Module AzureAD, I get this other error:
Import-Module : The current processor architecture is: X86. The module 'C:\Program Files\WindowsPowerShell\Modules\azuread\2.0.2.4\azuread.psd1' requires the following architecture: Amd64.
If I switch the terminal from PowerShell Integrated to powershell it works, but when I start debugging my code it goes back to the integrated one.
Any ideas how to fix this?
Find-Module -Name AzureAD | Install-Module
. – TheMadTechnician