how to install Az module in SQL Server 2008 R2

Shubhi Jain 21 Reputation points

I have an Azure SQL VM with having a 2008 R2 server and I want to install the Az module in it. but while trying I am getting the below error.

PS C:\Windows\system32> Install-Module -Name Az -AllowClobber
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'Az'. Try Get-PSRepository to see all available registered
module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1772 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
  • FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
SQL Server on Azure Virtual Machines
0 comments No comments
{count} votes

Accepted answer
  1. Roderick Bant 2,051 Reputation points

    You can try specifying the PowerShell Gallery as a repository:

    Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force

    If that doesn't work, you can also download the .MSI package and install that like any other MSI package.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful