Skip to content

Commit 6a17f68

Browse files
author
Samuel Anudeep
committed
Merge pull request #157 from MabOneSdk/release
RI from release into dev1
2 parents 1b43ca4 + 53bbda8 commit 6a17f68

File tree

391 files changed

+13656
-5686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+13656
-5686
lines changed

AzurePowershell.Test.targets

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -42,52 +42,64 @@
4242
<TestTimeout Condition=" '$(TestTimeout)' == '' ">100000000</TestTimeout>
4343
</PropertyGroup>
4444

45-
<ItemGroup>
46-
<XUnitTests Include=".\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll"/>
47-
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
48-
<XUnitTests Include=".\src\ServiceManagement\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
49-
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
50-
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
51-
<XUnitTests Include=".\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll"/>
52-
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
53-
<XUnitTests Include=".\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll"/>
54-
<XUnitTests Include=".\src\ResourceManager\Network\Commands.Network.Test\bin\Debug\Microsoft.Azure.Commands.Network.Test.dll"/>
55-
<XUnitTests Include=".\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll"/>
56-
<XUnitTests Include=".\src\ResourceManager\Dns\Commands.Dns.Test\bin\Debug\Microsoft.Azure.Commands.Dns.Test.dll"/>
57-
<XUnitTests Include=".\src\ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.StreamAnalytics.Test.dll"/>
58-
<XUnitTests Include=".\src\ResourceManager\OperationalInsights\Commands.OperationalInsights.Test\bin\Debug\Microsoft.Azure.Commands.OperationalInsights.Test.dll"/>
59-
<XUnitTests Include=".\src\ResourceManager\AzureBatch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll"/>
60-
<XUnitTests Include=".\src\ResourceManager\Websites\Commands.Websites.Test\bin\Debug\Microsoft.Azure.Commands.Websites.Test.dll"/>
61-
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
62-
<XUnitTests Include=".\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
63-
<XUnitTests Include=".\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll"/>
64-
<XUnitTests Include=".\src\ServiceManagement\RemoteApp\Commands.RemoteApp.Test\bin\Debug\Microsoft.Azure.Commands.RemoteApp.Tests.dll"/>
65-
<XUnitTests Include=".\src\ServiceManagement\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>
66-
<XUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
67-
<XUnitTests Include=".\src\ResourceManager\TrafficManager\Commands.TrafficManager2.Test\bin\Debug\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.dll"/>
68-
<XUnitTests Include=".\src\ServiceManagement\Network\Commands.Network.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.dll"/>
69-
<XUnitTests Include=".\src\ResourceManager\ApiManagement\Commands.ApiManagement.Test\bin\Debug\Microsoft.Azure.Commands.ApiManagement.Test.dll"/>
70-
<XUnitTests Include=".\src\ResourceManager\Profile\Commands.Profile.Test\bin\Debug\Microsoft.Azure.Commands.Profile.Test.dll"/>
71-
</ItemGroup>
72-
45+
7346
<Target Name="InvokeMSTest">
7447
<!--Remove existing test result; otherwise mstest will error-->
7548
<Delete Files="$(_testResult)"/>
7649
<Exec
7750
Command="MSTest.exe /testcontainer:$(_testAssembly) /testsettings:$(_testSettings) /category:$(_testFilter) /resultsfile:$(_testResult)"
7851
ContinueOnError="false" />
7952
</Target>
53+
54+
<Target Name="DeclareXunitTests">
55+
<ItemGroup>
56+
<AsmXUnitTests Include=".\src\ServiceManagement\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
57+
<AsmXUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
58+
<AsmXUnitTests Include=".\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll"/>
59+
<AsmXUnitTests Include=".\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll"/>
60+
<AsmXUnitTests Include=".\src\ServiceManagement\RemoteApp\Commands.RemoteApp.Test\bin\Debug\Microsoft.Azure.Commands.RemoteApp.Tests.dll"/>
61+
<AsmXUnitTests Include=".\src\ServiceManagement\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>
62+
<AsmXUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
63+
<AsmXUnitTests Include=".\src\ServiceManagement\Network\Commands.Network.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Network.Test.dll"/>
64+
</ItemGroup>
65+
<ItemGroup Condition=" '$(scope)' == '' ">
66+
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
67+
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
68+
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
69+
<XUnitTests Include=".\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll"/>
70+
<XUnitTests Include=".\src\ResourceManager\Network\Commands.Network.Test\bin\Debug\Microsoft.Azure.Commands.Network.Test.dll"/>
71+
<XUnitTests Include=".\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll"/>
72+
<XUnitTests Include=".\src\ResourceManager\Dns\Commands.Dns.Test\bin\Debug\Microsoft.Azure.Commands.Dns.Test.dll"/>
73+
<XUnitTests Include=".\src\ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.StreamAnalytics.Test.dll"/>
74+
<XUnitTests Include=".\src\ResourceManager\OperationalInsights\Commands.OperationalInsights.Test\bin\Debug\Microsoft.Azure.Commands.OperationalInsights.Test.dll"/>
75+
<XUnitTests Include=".\src\ResourceManager\AzureBatch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll"/>
76+
<XUnitTests Include=".\src\ResourceManager\Websites\Commands.Websites.Test\bin\Debug\Microsoft.Azure.Commands.Websites.Test.dll"/>
77+
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
78+
<XUnitTests Include=".\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll"/>
79+
<XUnitTests Include=".\src\ResourceManager\TrafficManager\Commands.TrafficManager2.Test\bin\Debug\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.dll"/>
80+
<XUnitTests Include=".\src\ResourceManager\ApiManagement\Commands.ApiManagement.Test\bin\Debug\Microsoft.Azure.Commands.ApiManagement.Test.dll"/>
81+
<XUnitTests Include=".\src\ResourceManager\Profile\Commands.Profile.Test\bin\Debug\Microsoft.Azure.Commands.Profile.Test.dll"/>
82+
<XUnitTests Include=".\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll"/>
83+
<XUnitTests Include="@(AsmXUnitTests)"/>
84+
</ItemGroup>
85+
<ItemGroup Condition=" '$(scope)' == 'ServiceManagement' ">
86+
<XUnitTests Include="@(AsmXUnitTests)"/>
87+
</ItemGroup>
88+
<ItemGroup Condition=" '$(scope)' !='' and '$(scope)' != 'ServiceManagement' ">
89+
<XUnitTests Include="$(MSBuildProjectDirectory)\src\ResourceManager\$(scope)\*\bin\Debug\*.Test.dll"/>
90+
</ItemGroup>
91+
</Target>
8092

81-
<Target Name="InvokeXUnit">
93+
<Target Name="InvokeXUnit" DependsOnTargets="DeclareXunitTests">
8294
<Message Importance="high" Text="Running XUnit tests" />
8395
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
8496
<Exec
8597
Command="$(MSBuildProjectDirectory)\packages\xunit.runner.console.2.0.0\tools\xunit.console.x86.exe &quot;%(XUnitTests.Identity)&quot; -parallel none -maxthreads 0 -trait &quot;AcceptanceType=CheckIn&quot; -html &quot;$(TestOutputDirectory)\%(XUnitTests.Filename).html&quot;"
86-
Timeout="$(TestTimeout)" ContinueOnError="false"/>
98+
Timeout="$(TestTimeout)" ContinueOnError="false" Condition=" @(XUnitTests) != '' "/>
8799
<OnError ExecuteTargets="TimeoutErrorHandler"/>
88100
</Target>
89101

90-
<Target Name="InvokeXUnitAll">
102+
<Target Name="InvokeXUnitAll" DependsOnTargets="DeclareXunitTests">
91103
<Message Importance="high" Text="Running XUnit tests" />
92104
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
93105
<Exec
@@ -101,7 +113,6 @@
101113
</Target>
102114

103115
<Target Name="BeforeRunTests">
104-
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />
105116
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
106117
</Target>
107118

build.proj

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
1919
/p:CodeSign=True;DelaySign=True
2020
Test the code sign workflow locally.
21-
21+
22+
/p:Scope
23+
'Azure': service management
24+
'AzureStorage': storage data plane cmdlets
25+
'Subfolder under src\ResourceManager': An individual cmdlet module
26+
By default, it builds all
2227
-->
2328

2429
<!-- Define build properties -->
@@ -36,11 +41,13 @@
3641
<SetupOutputDirectory>$(PublishDirectory)\Setup</SetupOutputDirectory>
3742
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
3843
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
39-
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' != '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
44+
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
4045
</PropertyGroup>
4146
<ItemGroup>
42-
<AzureResourceManagerSln Include=".\src\ResourceManager.sln" />
43-
<AzureServiceManagementSln Include=".\src\ServiceManagement.sln" />
47+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == '' "/>
48+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln" Condition=" '$(Scope)' != '' and '$(Scope)' != 'ServiceManagement' "/>
49+
<CmdletSolutionsToBuild Include=".\src\ServiceManagement\ServiceManagement.sln"
50+
Condition=" '$(Scope)' != '' and ('$(Scope)' == 'ServiceManagement' or '$(Scope)' == 'AzureStorage') "/>
4451
<SetupSln Include=".\setup\azurepowershell.sln" />
4552
<SetupPowershellGetSln Include=".\setup-powershellget\powershellget.sln" />
4653
</ItemGroup>
@@ -64,28 +71,19 @@
6471

6572
<!-- Clean the build in all configurations -->
6673
<Target Name="Clean">
67-
<!-- Clean the solutions -->
6874
<Message Importance="high" Text="Cleaning Cmdlets..." ContinueOnError="false" />
6975
<MSBuild
70-
Projects="@(AzureResourceManagerSln)"
71-
Targets="Clean"
72-
Properties="Configuration=$(Configuration);Platform=Any CPU"
73-
ContinueOnError="false" />
74-
<MSBuild
75-
Projects="@(AzureServiceManagementSln)"
76-
Targets="Clean"
77-
Properties="Configuration=$(Configuration);Platform=Any CPU"
78-
ContinueOnError="false" />
79-
<MSBuild
80-
Projects="@(SetupSln)"
76+
Projects="@(CmdletSolutionsToBuild)"
8177
Targets="Clean"
8278
Properties="Configuration=$(Configuration);Platform=Any CPU"
8379
ContinueOnError="false" />
80+
8481
<MSBuild
8582
Projects="@(SetupPowershellGetSln)"
8683
Targets="Clean"
8784
Properties="Configuration=$(Configuration);Platform=Any CPU"
88-
ContinueOnError="false" />
85+
ContinueOnError="false"
86+
Condition=" '$(Scope)' == '' "/>
8987

9088
<!-- Delete the publish files -->
9189
<Message Importance="high" Text="Cleaning publish files..." ContinueOnError="false" />
@@ -113,7 +111,7 @@
113111
</Target>
114112

115113
<PropertyGroup>
116-
<NuGetCommand>$(MSBuildProjectDirectory)\src\.nuget\NuGet.exe</NuGetCommand>
114+
<NuGetCommand>$(MSBuildProjectDirectory)\tools\NuGet.exe</NuGetCommand>
117115
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
118116
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
119117
<PowerShellCommand>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand>
@@ -140,9 +138,9 @@
140138
<Exec Command="$(NuGetCommand) sources add -Name LocalFeed -Source &quot;$(MSBuildProjectDirectory)\tools\LocalFeed&quot; $(NuGetRestoreConfigSwitch)"/>
141139

142140
<!-- Restore packages -->
143-
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\ResourceManager.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false" />
144-
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\ServiceManagement.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false" />
145-
141+
<Exec Command="$(NuGetCommand) restore %(CmdletSolutionsToBuild.FullPath) $(NuGetRestoreConfigSwitch)"
142+
ContinueOnError="false" />
143+
146144
<!--Restore the xunit runner needed to run unit tests-->
147145
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\packages.config -PackagesDirectory $(MSBuildProjectDirectory)\packages" />
148146

@@ -153,15 +151,11 @@
153151
<Target Name="Build" DependsOnTargets="RestoreNugetPackages;BuildMsBuildTask">
154152
<Message Importance="high" Text="Building Cmdlets..." />
155153
<MSBuild
156-
Projects="@(AzureResourceManagerSln)"
154+
Projects="@(CmdletSolutionsToBuild)"
157155
Targets="Build"
158156
Properties="Configuration=$(Configuration);Platform=Any CPU"
159-
BuildInParallel="$(BuildInParallel)" ContinueOnError="false" />
160-
<MSBuild
161-
Projects="@(AzureServiceManagementSln)"
162-
Targets="Build"
163-
Properties="Configuration=$(Configuration);Platform=Any CPU"
164-
BuildInParallel="$(BuildInParallel)" ContinueOnError="false" />
157+
BuildInParallel="$(BuildInParallel)"
158+
ContinueOnError="false" />
165159

166160
<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />
167161

@@ -170,14 +164,18 @@
170164
Projects="@(SetupPowershellGetSln)"
171165
Targets="Build"
172166
Properties="Configuration=$(Configuration);Platform=Any CPU"
173-
ContinueOnError="false" />
167+
ContinueOnError="false"
168+
Condition=" '$(Scope)' == '' "/>
169+
174170
<MSBuild
175171
Projects="@(SetupSln)"
176172
Targets="Build"
177173
Properties="Configuration=$(Configuration);Platform=Any CPU"
178-
ContinueOnError="false" />
174+
ContinueOnError="false"
175+
Condition=" '$(Scope)' == '' "/>
179176

180-
<CallTarget Targets="CodeSignInstaller" Condition=" '$(CodeSign)' == 'true' " />
177+
<CallTarget Targets="CodeSignInstaller"
178+
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == ''" />
181179
</Target>
182180

183181
<!-- Do everything possible -->
@@ -205,6 +203,10 @@
205203
<!-- Copying shortcut to be signed -->
206204
<Copy SourceFiles="$(LibraryRoot)setup-powershellget\Setup\ShortcutStartup.ps1"
207205
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
206+
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psd1"
207+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
208+
<Copy SourceFiles="$(LibraryRoot)tools\AzureRM\AzureRM.psm1"
209+
DestinationFolder="$(LibrarySourceFolder)\Package\$(Configuration)" />
208210

209211
<ItemGroup>
210212
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft*Azure*Commands*.dll" />
@@ -256,6 +258,10 @@
256258
<!-- Copying signed shortcut back -->
257259
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\ShortcutStartup.ps1"
258260
DestinationFolder="$(LibraryRoot)setup-powershellget\Setup" />
261+
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psd1"
262+
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
263+
<Copy SourceFiles="$(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psm1"
264+
DestinationFolder="$(LibraryRoot)tools\AzureRM" />
259265
</Target>
260266

261267
<Target Name="CodeSignInstaller">
@@ -292,8 +298,7 @@
292298
<Target Name="Publish" DependsOnTargets="Build">
293299
<Error Condition=" '$(NuGetKey)' == '' " Text="You must provide the NuGetKey parameter to the build: /p:NuGetKey=YOUR_PUBLISHING_KEY" />
294300
<Message Importance="high" Text="Publishing Cmdlets..." />
295-
296-
<Exec Command="$(PowerShellCommand) -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(NuGetKey) \&quot;$(NuGetPublishingSource)\&quot;&quot;"/>
301+
<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\PublishModules.ps1 $(Configuration) $(Scope) $(NuGetKey) \&quot;$(NuGetPublishingSource)\&quot; &quot;"/>
297302
</Target>
298303

299304
<PropertyGroup>
@@ -305,7 +310,7 @@
305310
<Import Project="$(MSBuildThisFileDirectory)AzurePowershell.test.targets"/>
306311

307312
<!-- Run checkin tests for each pull request -->
308-
<Target Name="Test" DependsOnTargets="Build;BeforeRunTests">
313+
<Target Name="Test" DependsOnTargets="BeforeRunTests">
309314
<Message Importance="high" Text="Running check in tests..." />
310315
<CallTarget Targets="InvokeXUnit"/>
311316
</Target>

setup-powershellget/Setup/ShortcutStartup.ps1

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,35 @@ Finalizing installation of Azure PowerShell.
2626
Installing Azure Modules from PowerShell Gallery.
2727
This may take some time...
2828
"@
29+
$env:PSModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules;$env:ProgramFiles\WindowsPowerShell\Modules;$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules\"
30+
2931
Import-Module PackageManagement
30-
Get-PackageProvider -Name NuGet -ForceBootstrap
32+
33+
$result = Get-PackageProvider -Name NuGet -ForceBootstrap
34+
35+
Import-Module PowerShellGet
3136

32-
$NuGetPublishingSource = $env:NuGetPublishingSource
33-
if ([string]::IsNullOrWhiteSpace($NuGetPublishingSource)) {
34-
Install-Module AzureRM -Repository $NuGetPublishingSource
35-
} else {
36-
Install-Module AzureRM
37-
}
37+
Install-Module AzureRM
38+
Write-Output "AzureRM $((Get-InstalledModule -Name AzureRM)[0].Version) installed..."
39+
Update-AzureRM
3840
} else {
3941
cd c:\
4042
$welcomeMessage = @"
4143
For a list of all Azure cmdlets type 'help azure'.
4244
For a list of Azure Pack cmdlets type 'Get-Command *wapack*'.
45+
46+
To use Azure Service Management cmdlets please execute the following cmdlet:
47+
Install-Module Azure
4348
"@
4449
Write-Output $welcomeMessage
4550

4651
$VerbosePreference = "Continue"
4752
}
4853
}
49-
catch { Write-Output $error }
50-
if ($error) {
51-
Read-Host -Prompt "An error occured during installation. Press any key..."
54+
catch
55+
{
56+
Write-Output "An error occured during installation."
57+
Write-Output $error
58+
Write-Output "Press any key..."
59+
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
5260
}

0 commit comments

Comments
 (0)