Forum Discussion

gzygadlo's avatar
gzygadlo
Brass Contributor
Aug 19, 2021

AzureAD Powershell 7

Wondering if any version of PowerShell 7 will work with the AzureAD or AzureADPreview modules.  When I try to connect I get an error "One or more errors occurred"

 

I'm trying to move my environment from Windows Power 5.1 to Windows Powershell 7.  Currently running Powershell 7.2 Preview 7.  Maybe there is another module I need to use instead of AzureAD or AzureADPreview.

 

Thanks

  • gzygadlo The recommended approach, until those modules are fully compatible with newer versions of PowerShell, would be to import them with the -UseWindowsPowerShell option in your PowerShell 7 session. This will load the module in the version of PowerShell included with Windows, but using implicit remoting you can use it as if it were loaded in PowerShell 7.

     

    This is described on this webpage.

  • pvanberlo's avatar
    pvanberlo
    Steel Contributor

    gzygadlo The recommended approach, until those modules are fully compatible with newer versions of PowerShell, would be to import them with the -UseWindowsPowerShell option in your PowerShell 7 session. This will load the module in the version of PowerShell included with Windows, but using implicit remoting you can use it as if it were loaded in PowerShell 7.

     

    This is described on this webpage.

      • pvanberlo's avatar
        pvanberlo
        Steel Contributor

        Wolfgang_Bures_SV Have you considered moving to the Microsoft Graph PowerShell modules as the recommended replacement of the Azure AD module? In general I find the Graph PS modules to be of very good quality and can be used in most circumstances. 

Resources