Skip to content

Dev #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 29, 2015
Merged

Dev #125

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion setup-powershellget/Setup/ShortcutStartup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@ Param(
[switch]$Install
)

function EnsureRegistryPath
{
$originalpaths = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PSModulePath).PSModulePath
if($originalpaths.Contains("$env:ProgramFiles\WindowsPowerShell\Modules") -eq $false)
{
Write-Output "Fixing PSModulePath"
$newPath = "$originalpaths;$env:ProgramFiles\WindowsPowerShell\Modules"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PSModulePath –Value $newPath
}
else
{
Write-Output "PSModulePath successfuly validated"
}
}

$error.clear()
try {
if ($Install.IsPresent) {
EnsureRegistryPath
Write-Output @"
Finalizing installation of Azure PowerShell.
Expand Down Expand Up @@ -57,4 +73,5 @@ Write-Output "An error occured during installation."
Write-Output $error
Write-Output "Press any key..."
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,7 @@
<Compile Include="Autoscale\NewAutoscaleProfileCommandTests.cs" />
<Compile Include="Autoscale\NewAutoscaleRuleCommandTests.cs" />
<Compile Include="Autoscale\RemoveAutoscaleSettingCommandTests.cs" />
<Compile Include="Events\GetAzureCorrelationIdLogCommandTests.cs" />
<Compile Include="Events\GetAzureResourceLogCommandTests.cs" />
<Compile Include="Events\GetAzureResourceProviderLogCommandTests.cs" />
<Compile Include="Events\GetAzureSubscriptionIdLogCommandTests.cs" />
<Compile Include="Events\GetAzureResourceGroupLogCommandTests.cs" />
<Compile Include="Events\GetAzureRmLogCommandTests.cs" />
<Compile Include="Metrics\FormatMetricsAsTableCommandTests.cs" />
<Compile Include="Metrics\GetMetricDefinitionsCommandTests.cs" />
<Compile Include="Metrics\GetMetricsCommandTests.cs" />
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading