locked
Error installing AAD PowerShell module RRS feed

  • Question

  • I have a Windows 7 64bit workstation and I am trying to install AAD PowerShell module. 

    I have a PowerShell window opened with elevated privileges and I ran the following command: Install-Module -Name AzureAD

    I get the following errors. Help!

    WARNING: Unable to download from URI 'https://oneget.org/nuget-2.8.5.208.package.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/nugetv2.feed.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/psl.feed.swidtag' to ''.
    PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 
    'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 char:21
    + ...     $null = PackageManagement\Install-PackageProvider -Name $script:N ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider
     
    PackageManagement\Import-PackageProvider : No match was found for the specified search criteria and provider name 'NuGet'. Try 'Get-PackageProvider -ListAvailable' to 
    see if the provider exists on the system.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7411 char:21
    + ...     $null = PackageManagement\Import-PackageProvider -Name $script:Nu ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (NuGet:String) [Import-PackageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.ImportPackageProvider
     
    WARNING: Unable to download from URI 'https://oneget.org/nuget-2.8.5.208.package.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/nugetv2.feed.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/psl.feed.swidtag' to ''.
    PackageManagement\Get-PackageProvider : Unable to find package provider 'NuGet'. It may not be imported yet. Try 'Get-PackageProvider -ListAvailable'.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7415 char:30
    + ... tProvider = PackageManagement\Get-PackageProvider -Name $script:NuGet ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power...PackageProvider:GetPackageProvider) [Get-PackageProvider], Exception
        + FullyQualifiedErrorId : UnknownProviderFromActivatedList,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackageProvider
     
    Install-Module : NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed.
    At line:1 char:1
    + Install-Module -Name AzureAD
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Install-Module], InvalidOperationException
        + FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Module

    Friday, August 17, 2018 7:24 PM

Answers

  • Found the solutions to my issues:

    1. Had my destktop support team grant me local admin rights for my regular user account (my Admin account was blocked by the proxy from going out)

    2. From another site I found that I need to restore the PSRespository back to default using:

     register-psrepository -default

    This now pointed the PSGallery to www.powershellgallery.com/api/v2

    From here I was now able to install AADRM and AzureRM

    Thank you everyone for assisting

    • Marked as answer by MrDisco1 Tuesday, September 11, 2018 4:51 PM
    Tuesday, September 11, 2018 4:50 PM

All replies

  • PowerShell Required some set of packages as the error message states that NuGet packages are unable to find, it required NuGet Packages to install AD Modules.

    I would suggest you to try the below cmdlets to achieve your scenario: Install-PackageProvider NuGet -Force

    Import-PackageProvider NuGet -Force

    Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

    Install-Module Pscx -AllowClobber    

    For more information, suggest you to refer AzureAD.

    -------------------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” and Up-Vote. To provide additional feedback on your forum experience, click here 


    Saturday, August 18, 2018 5:13 AM
  • Just checking in if you have had a chance to see our previous response. If this answers your query, do click “Mark as Answer” and Up-Vote for the same. And, if you have any further query do let us know.
    Monday, August 20, 2018 7:40 PM
  • I ran the first cmdlet but I get the following error:

    PS C:\Windows\system32> Install-PackageProvider NuGet -Force
    WARNING: MSG:UnableToDownload «https://oneget.org/nuget-2.8.5.208.package.swidtag» «»
    WARNING: MSG:UnableToDownload «https://oneget.org/psl-1.0.0.210.package.swidtag» «»
    WARNING: MSG:UnableToDownload «https://oneget.org/ChocolateyPrototype-2.8.5.130.package.swidtag» «»
    WARNING: Unable to download from URI 'https://oneget.org/nuget-2.8.5.208.package.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/nugetv2.feed.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/psl.feed.swidtag' to ''.
    Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package
    provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.
    At line:1 char:1
    + Install-PackageProvider NuGet -Force
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pac
       kageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackagePro
       vider

    Monday, August 20, 2018 8:27 PM
  • Could you confirm that you are using operating system Windows 7 with SP1? If so, I would suggest you install the .NET Framework 4.5 or above. You can install .NET Framework 4.5 or above from here.

    Also, you may refer the following reference links for steps to install the Azure PowerShell modules in a Windows environment using PowerShell Get. See if this helps.

    Reference: -  Installing PowerShell Get and Azure active directory V2 PowerShell Module

    -----------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here.

    • Proposed as answer by YASWANTH MADI Wednesday, August 22, 2018 7:51 PM
    Wednesday, August 22, 2018 7:51 PM
  • Just checking in if you have had a chance to see our previous response. If this answers your query, do click “Mark as Answer” and Up-Vote for the same. And, if you have any further query do let us know. 
    Sunday, August 26, 2018 8:55 PM
  • Yes I'm running Win 7 SP1

    I have .NET 4.5.2 currently installed

    When I try to install the latest Nuget from the link provided I get the following error:

    PS C:\Windows\system32> Install-PackageProvider Nuget -force
    WARNING: MSG:UnableToDownload «https://oneget.org/nuget-2.8.5.208.package.swidtag» «»
    WARNING: MSG:UnableToDownload «https://oneget.org/psl-1.0.0.210.package.swidtag» «»
    WARNING: MSG:UnableToDownload «https://oneget.org/ChocolateyPrototype-2.8.5.130.package.swidtag» «»
    WARNING: Unable to download from URI 'https://oneget.org/nuget-2.8.5.208.package.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/nugetv2.feed.swidtag' to ''.
    WARNING: Unable to download from URI 'https://oneget.org/psl.feed.swidtag' to ''.
    Install-PackageProvider : No match was found for the specified search criteria for the provider 'Nuget'. The package
    provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.
    At line:1 char:1
    + Install-PackageProvider Nuget -force
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pac
       kageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackagePro
       vider

    Tuesday, August 28, 2018 5:25 PM
  • Just for the confirmation are you trying to install Azure AD modules is  “PS.Version5.1”,if not please download and install from this link and run the below steps:

    Open PS in Admin mode

    Check for the version - $psVersionTable

    Install azure Import-Module AzureRM

    Install azure modules: Install-Module AzureAD

    I am able to repro the issue. Please refer to below screenshot :

    For more information, suggest you to refer Azure Active Directory PowerShell for Graph.

    -----------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or “Up-Vote”. To provide additional feedback on your forum experience, click here


    Wednesday, September 5, 2018 11:31 AM
  • Just checking in if you have had a chance to see our previous response. If this answers your query, do click “Mark as Answer” and Up-Vote for the same. And, if you have any further query do let us know.
    Friday, September 7, 2018 9:59 AM
  • Yes I running PS 5.1 (5.1.14409.1012 to be exact)

    I'm trying various things and am running into errors each way:

    install-packageprovider nuget -force
    returns:
    nuget                        2.8.5.208        https://onege... NuGet provider for the OneGet meta-package manager

    set-psrepository -name psgallery -installationpolicy trusted
    returns:
    Set-PSRepository : No repository with the name 'PSGallery' was found.

    At line:1 char:1
    + Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (PSGallery:String) [Set-PSRepository], InvalidOperationException
        + FullyQualifiedErrorId : RepositoryNotFound,Set-PSRepository

    install-module -name AzureRm -requiredversion 6.7.0 
    returns:

    PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'AzureRm'.
    Try Get-PSRepository to see all available registered module repositories.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21
    + ...          $null = PackageManagement\Install-Package @PSBoundParameters
    +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
       ception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

    install-module -name aadrm
    returns:

    PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'aadrm'. Try
    Get-PSRepository to see all available registered module repositories.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21
    + ...          $null = PackageManagement\Install-Package @PSBoundParameters
    +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
       ception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

    Tuesday, September 11, 2018 4:25 PM
  • Found the solutions to my issues:

    1. Had my destktop support team grant me local admin rights for my regular user account (my Admin account was blocked by the proxy from going out)

    2. From another site I found that I need to restore the PSRespository back to default using:

     register-psrepository -default

    This now pointed the PSGallery to www.powershellgallery.com/api/v2

    From here I was now able to install AADRM and AzureRM

    Thank you everyone for assisting

    • Marked as answer by MrDisco1 Tuesday, September 11, 2018 4:51 PM
    Tuesday, September 11, 2018 4:50 PM
  • Good to hear that you have found a solution. Appreciate for sharing the information which helped you, this would certainly benefit other community members. 
    Tuesday, September 11, 2018 6:40 PM