Skip to content

Commit b9b7942

Browse files
committed
Merge pull request #7 from Azure/dev
Merge from master
2 parents 9df32e3 + e586593 commit b9b7942

File tree

512 files changed

+51137
-15219
lines changed

Some content is hidden

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

512 files changed

+51137
-15219
lines changed

ChangeLog.md

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
1+
* Azure Redis Cache: new cmdlets for enabling and disabling diagnostics
2+
* Set-AzureRmRedisCacheDiagnostics
3+
* Remove-AzureRmRedisCacheDiagnostics
4+
## 2015.12.14 version 1.0.2
5+
* Azure Compute (ARM):
6+
* Enable BGInfo extension by default
7+
* Fix the issue when an OS disk is in a different resource group: Now New-AzureRmVM does not create a new storage account for boot diagnostics.
8+
* Add Set-AzureRmBginfoExtension cmdlet
9+
* Make WinRMCertificateUrl parameter mandatory when Set-AzureRmVMOperatingSystem cmdlet is performed with WinRMHttps switch
10+
* Azure Compute (Service Management):
11+
* Fix the issue when adding a new VM without a data disk
12+
* Add ExtensionId parameter for all extension cmdlets
13+
* Expose RemoteAccessCertificateThumbprint property for Get-AzureVM cmdlet
114
* Azure SQL Database: new cmdlets for managing database threat detection policies:
215
* Get-AzureRmSqlDatabaseThreatDetectionPolicy
316
* Set-AzureRmSqlDatabaseThreatDetectionPolicy
417
* Remove-AzureRmSqlDatabaseThreatDetectionPolicy
518
* Azure RemoteApp: New cmdlets for managing stale machine accounts in AD:
619
* Get-AzureRemoteAppVmStaleAdObject
720
* Clear-AzureRemoteAppVmStaleAdObject
8-
* Azure Intune: New cmdlets for Mobile Application management:
9-
* Add-AzureRmIntuneAndroidMAMPolicyApp
10-
* Add-AzureRmIntuneAndroidMAMPolicyGroup
11-
* Add-AzureRmIntuneiOSMAMPolicyApp
12-
* Add-AzureRmIntuneiOSMAMPolicyGroup
13-
* Get-AzureRmIntuneAndroidMAMApp
14-
* Get-AzureRmIntuneAndroidMAMPolicy
15-
* Get-AzureRmIntuneAndroidMAMPolicyApp
16-
* Get-AzureRmIntuneAndroidMAMPolicyGroup
17-
* Get-AzureRmIntuneiOSMAMApp
18-
* Get-AzureRmIntuneiOSMAMPolicy
19-
* Get-AzureRmIntuneiOSMAMPolicyApp
20-
* Get-AzureRmIntuneiOSMAMPolicyGroup
21-
* Get-AzureRmIntuneMAMFlaggedUser
22-
* Get-AzureRmIntuneMAMStatus
23-
* Get-AzureRmIntuneMAMUserDevice
24-
* Get-AzureRmIntuneMAMUserFlaggedEnrolledApp
25-
* Get-AzureRmIntuneOperationResult
26-
* Invoke-AzureRmIntuneMAMUserDeviceWipe
27-
* New-AzureRmIntuneAndroidMAMPolicy
28-
* New-AzureRmIntuneiOSMAMPolicy
29-
* Remove-AzureRmIntuneAndroidMAMPolicy
30-
* Remove-AzureRmIntuneAndroidMAMPolicyApp
31-
* Remove-AzureRmIntuneAndroidMAMPolicyGroup
32-
* Remove-AzureRmIntuneIOSMAMPolicy
33-
* Remove-AzureRmIntuneiOSMAMPolicyApp
34-
* Remove-AzureRmIntuneiOSMAMPolicyGroup
35-
* Set-AzureRmIntuneAndroidMAMPolicy
36-
* Set-AzureRmIntuneiOSMAMPolicy
37-
21+
* ARM Storage:
22+
* Fix alias missing issue
23+
24+
3825
## 2015.11.09 version 1.0.1
3926
* Azure Compute
4027
* Added cmdlets for managing VM DiskEncryption extension

build.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
<Scope Condition=" $(Scope) == '' " >all</Scope>
4646
</PropertyGroup>
4747
<ItemGroup>
48-
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln" Condition=" '$(Scope)' == 'all' "/>
48+
<CmdletSolutionsToBuild Include=".\src\ResourceManager\**\*.sln;.\src\ServiceManagement\ServiceManagement.sln"
49+
Exclude=".\src\ResourceManager\Intune\*.sln"
50+
Condition=" '$(Scope)' == 'all' "/>
4951
<CmdletSolutionsToBuild Include=".\src\ResourceManager\$(Scope)\*.sln"
5052
Condition=" '$(Scope)' != 'all' and '$(Scope)' != 'ServiceManagement' and '$(Scope)' != 'AzureStorage' "/>
5153
<CmdletSolutionsToBuild Include=".\src\ServiceManagement\ServiceManagement.sln"

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - November 2015" ?>
4+
<?define productName="Microsoft Azure PowerShell - December 2015" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="1.0.1" ?>
8+
<?define version="1.0.2" ?>
99
<?define versionedStartMenuFolder="Microsoft Azure" ?>
1010
<?define staleStartMenuFolder="Windows Azure" ?>
1111

setup/azurecmdfiles.wxi

Lines changed: 28 additions & 86 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<HintPath>..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
5757
</Reference>
5858
<Reference Include="Microsoft.Azure.Common.Authentication">
59-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.4.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
59+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6060
<Private>True</Private>
6161
</Reference>
6262
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -96,7 +96,7 @@
9696
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
9797
</Reference>
9898
<Reference Include="Microsoft.Rest.ClientRuntime">
99-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.4.1\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.dll</HintPath>
99+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
100100
<Private>True</Private>
101101
</Reference>
102102
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

src/Common/Commands.Common.Storage/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
@@ -15,7 +15,7 @@
1515
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net45" />
1616
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1717
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
18-
<package id="Microsoft.Rest.ClientRuntime" version="1.4.1" targetFramework="net45" />
18+
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
1919
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class AzurePowerShell
2929

3030
public const string AssemblyVersion = "1.0.0";
3131

32-
public const string AssemblyFileVersion = "1.0.1";
32+
public const string AssemblyFileVersion = "1.0.2";
3333

3434
public const string ProfileFile = "AzureProfile.json";
3535

src/Common/Commands.Common/Commands.Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</Reference>
6565
<Reference Include="Microsoft.Azure.Common.Authentication">
6666
<SpecificVersion>False</SpecificVersion>
67-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.4.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
67+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6868
</Reference>
6969
<Reference Include="Microsoft.Azure.Common.NetFramework">
7070
<SpecificVersion>False</SpecificVersion>
@@ -83,7 +83,7 @@
8383
<HintPath>..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
8484
</Reference>
8585
<Reference Include="Microsoft.Rest.ClientRuntime">
86-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.4.1\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.dll</HintPath>
86+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
8787
<Private>True</Private>
8888
</Reference>
8989
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

src/Common/Commands.Common/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<package id="Microsoft.ApplicationInsights" version="1.1.1-beta" targetFramework="net45" />
55
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
7-
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
7+
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
1010
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1111
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1212
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1313
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1414
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
15-
<package id="Microsoft.Rest.ClientRuntime" version="1.4.1" targetFramework="net45" />
15+
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
1616
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
1818
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />

src/Common/Commands.ScenarioTests.Common/Commands.ScenarioTests.Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</Reference>
4848
<Reference Include="Microsoft.Azure.Common.Authentication">
4949
<SpecificVersion>False</SpecificVersion>
50-
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.4.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
50+
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.5.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
5151
</Reference>
5252
<Reference Include="Microsoft.Azure.Common.NetFramework">
5353
<HintPath>..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
@@ -95,7 +95,7 @@
9595
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
9696
</Reference>
9797
<Reference Include="Microsoft.Rest.ClientRuntime">
98-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.4.1\lib\dotnet\Microsoft.Rest.ClientRuntime.dll</HintPath>
98+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
9999
<Private>True</Private>
100100
</Reference>
101101
<Reference Include="System" />

src/Common/Commands.ScenarioTests.Common/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Test.Framework" version="1.0.5799.28345-prerelease" targetFramework="net45" />
@@ -12,7 +12,7 @@
1212
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1313
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1414
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
15-
<package id="Microsoft.Rest.ClientRuntime" version="1.4.1" targetFramework="net45" />
15+
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
1616
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
1818
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/Common/Storage/Azure.Storage.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '1.0.1'
12+
ModuleVersion = '1.0.2'
1313

1414
# ID used to uniquely identify this module
1515
GUID = '00612bca-fa22-401d-a671-9cc48b010e3b'
@@ -45,7 +45,7 @@ CLRVersion='4.0'
4545
ProcessorArchitecture = 'None'
4646

4747
# Modules that must be imported into the global environment prior to importing this module
48-
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.1'})
48+
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.2'})
4949

5050
# Assemblies that must be loaded prior to importing this module
5151
RequiredAssemblies = @()

src/Common/Storage/Commands.Storage.Test/Commands.Storage.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
</Reference>
6060
<Reference Include="Microsoft.Azure.Common.Authentication">
6161
<SpecificVersion>False</SpecificVersion>
62-
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.4.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
62+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.5.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
6363
</Reference>
6464
<Reference Include="Microsoft.Azure.Common.NetFramework">
6565
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
@@ -97,7 +97,7 @@
9797
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.18.206251556\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
9898
</Reference>
9999
<Reference Include="Microsoft.Rest.ClientRuntime">
100-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.4.1\lib\dotnet\Microsoft.Rest.ClientRuntime.dll</HintPath>
100+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
101101
<Private>True</Private>
102102
</Reference>
103103
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication">

src/Common/Storage/Commands.Storage.Test/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.4.1-preview" targetFramework="net45" />
5+
<package id="Microsoft.Azure.Common.Authentication" version="1.5.1-preview" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
@@ -15,7 +15,7 @@
1515
<package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net45" />
1616
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1717
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
18-
<package id="Microsoft.Rest.ClientRuntime" version="1.4.1" targetFramework="net45" />
18+
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net45" />
1919
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.11.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />

src/Common/Storage/Commands.Storage/Commands.Storage.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
5151
</Reference>
5252
<Reference Include="Microsoft.Azure.Common.Authentication">
53-
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.4.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
53+
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.5.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
5454
<Private>True</Private>
5555
</Reference>
5656
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -86,7 +86,7 @@
8686
<Private>True</Private>
8787
</Reference>
8888
<Reference Include="Microsoft.Rest.ClientRuntime">
89-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.4.1\lib\dotnet\Microsoft.Rest.ClientRuntime.dll</HintPath>
89+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.1.8.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
9090
<Private>True</Private>
9191
</Reference>
9292
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication">

src/Common/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class NewAzureStorageContext : AzureDataCmdlet
7373
/// </summary>
7474
private const string AnonymousEnvironmentParameterSet = "AnonymousAccountEnvironment";
7575

76-
private const string StorageAccountNameHelpMessage = "Azure Storage Acccount Name";
76+
private const string StorageAccountNameHelpMessage = "Azure Storage Account Name";
7777
[Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage,
7878
Mandatory = true, ParameterSetName = AccountNameKeyParameterSet)]
7979
[Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage,
@@ -283,7 +283,7 @@ internal CloudStorageAccount GetAnonymousStorageAccountFromAzureEnvironment(stri
283283
/// <summary>
284284
/// Get storage account and use specific end point
285285
/// </summary>
286-
/// <param name="credential">Storage credentail</param>
286+
/// <param name="credential">Storage credential</param>
287287
/// <param name="storageAccountName">Storage account name, it's used for build end point</param>
288288
/// <param name="useHttps"></param>
289289
/// <param name="endPoint"></param>
@@ -350,6 +350,19 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
350350
}
351351
}
352352

353+
if(null == azureEnvironment)
354+
{
355+
try
356+
{
357+
var profileClient = new ProfileClient(new AzureSMProfile());
358+
azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
359+
}
360+
catch(ArgumentException e)
361+
{
362+
throw new ArgumentException(e.Message + " " + string.Format(CultureInfo.CurrentCulture, Resources.ValidEnvironmentName, EnvironmentName.AzureCloud, EnvironmentName.AzureChinaCloud));
363+
}
364+
}
365+
353366
}
354367

355368
if (null != azureEnvironment)

0 commit comments

Comments
 (0)