jldeen / SVCC-AzureMgmtxplat

11 stars 10 forks source link

OSX install fails #2

Open jabad3hut opened 7 years ago

jabad3hut commented 7 years ago

I receive errors about needing to run as the administrator while running the script. PackageManagement\Install-Package : Administrator rights are required to install or update. Log on Installing package 'AzureRM.NetCore.Preview' to the computer with an account that has Administrator rights, and then try again, or install by adding "-Scope CurrentUser" to your command. You can also try running the Windows PowerShell oooooooosession with elevated rights (Run as Administrator). At /usr/local/microsoft/powershell/6.0.0-alpha.14/Modules/PowerShellGet/1.1.2.0/PSModule.psm1:1809 char:21 [oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo+ ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (System.Collections.ArrayList:String) [Install-Packa ge], Exceptionng dependent package 'AzureRM.Profile.NetCore.Preview' + FullyQualifiedErrorId : AdministratorRightsNeededOrSpecifyCurrentUserScope,Copy-Module,Micros oft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Import-Module : The specified module 'AzureRM.NetCore.Preview' was not loaded because no valid module file was found in any module directory. At line:1 char:1

No idea how to get around this.

irwins commented 7 years ago

Hi @jabad3hut,

I ran into this as well. My workaround was to use {}.

Azure RM NetCore Preview Module Install

sudo powershell { Install-Module -Name AzureRM.Netcore} sudo powershell { Import-Module AzureRM.Netcore}

This resolved my issue

HTH

Rg./Irwin