diff --git a/build.proj b/build.proj index c84fb3b3628b..cf40908fae66 100644 --- a/build.proj +++ b/build.proj @@ -197,6 +197,10 @@ + + @@ -248,6 +252,10 @@ + + diff --git a/setup-powershellget/Setup/ShortcutStartup.ps1 b/setup-powershellget/Setup/ShortcutStartup.ps1 index c8dafd9404e9..3863027c6fd6 100644 --- a/setup-powershellget/Setup/ShortcutStartup.ps1 +++ b/setup-powershellget/Setup/ShortcutStartup.ps1 @@ -26,7 +26,7 @@ Finalizing installation of Azure PowerShell. Installing Azure Modules from PowerShell Gallery. This may take some time... "@ - $env:PSModulePath = "$env:HOME\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\" + $env:PSModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\" Import-Module PackageManagement diff --git a/setup-powershellget/azurecmd.wxs b/setup-powershellget/azurecmd.wxs index fc9f5f12c862..c7838161b733 100644 --- a/setup-powershellget/azurecmd.wxs +++ b/setup-powershellget/azurecmd.wxs @@ -1,6 +1,6 @@  - + @@ -28,8 +28,6 @@ - - @@ -60,19 +58,17 @@ - + + + - - - - - @@ -92,15 +88,14 @@ - - + diff --git a/tools/AzureRM/AzureRM.psm1 b/tools/AzureRM/AzureRM.psm1 index 6ae0626e4ba1..0f61bd8f478b 100644 --- a/tools/AzureRM/AzureRM.psm1 +++ b/tools/AzureRM/AzureRM.psm1 @@ -105,17 +105,15 @@ function Uninstall-AzureRM Write-Output "Uninstalling AzureRM modules." - $installedModules = Get-InstalledModule - $AzureRMModules.Keys | ForEach { $moduleName = $_ - if (($installedModules | where {$_.Name -eq $moduleName}) -ne $null) { + if ((Get-InstalledModule | where {$_.Name -eq $moduleName}) -ne $null) { Uninstall-Module -Name $_ -ErrorAction Stop Write-Output "$moduleName uninstalled..." } } - if (($installedModules | where {"AzureRM.Profile" -eq $moduleName}) -ne $null) { + if ((Get-InstalledModule | where {"AzureRM.Profile" -eq $moduleName}) -ne $null) { Uninstall-Module -Name "AzureRM.Profile" -ErrorAction Stop Write-Output "AzureRM.Profile uninstalled..." }