diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi
index 672cd10e5031..8b3a225314d8 100644
--- a/setup/azurecmdfiles.wxi
+++ b/setup/azurecmdfiles.wxi
@@ -68,6 +68,9 @@
+
+
+
@@ -2229,6 +2232,9 @@
+
+
+
@@ -2336,6 +2342,9 @@
+
+
+
@@ -2467,6 +2476,9 @@
+
+
+
@@ -2625,6 +2637,9 @@
+
+
+
@@ -2711,6 +2726,9 @@
+
+
+
@@ -2836,6 +2854,9 @@
+
+
+
@@ -2976,6 +2997,9 @@
+
+
+
@@ -3329,6 +3353,9 @@
+
+
+
@@ -3417,6 +3444,9 @@
+
+
+
@@ -3548,6 +3578,9 @@
+
+
+
@@ -3916,6 +3949,9 @@
+
+
+
@@ -4056,6 +4092,9 @@
+
+
+
@@ -4142,6 +4181,9 @@
+
+
+
@@ -4200,6 +4242,7 @@
+
@@ -4903,6 +4946,7 @@
+
@@ -4938,6 +4982,7 @@
+
@@ -4981,6 +5026,7 @@
+
@@ -5033,6 +5079,7 @@
+
@@ -5061,6 +5108,7 @@
+
@@ -5102,6 +5150,7 @@
+
@@ -5148,6 +5197,7 @@
+
@@ -5255,6 +5305,7 @@
+
@@ -5283,6 +5334,7 @@
+
@@ -5326,6 +5378,7 @@
+
@@ -5438,6 +5491,7 @@
+
@@ -5484,6 +5538,7 @@
+
@@ -5512,6 +5567,7 @@
+
diff --git a/src/Common/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs b/src/Common/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
index 62f0f1939d67..efde651e34d1 100644
--- a/src/Common/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
+++ b/src/Common/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
@@ -173,7 +173,7 @@ public string SrcContainer
[Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = FileParameterSet)]
[Parameter(HelpMessage = "Source Azure Storage Context Object", ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = FileToBlobParameterSet)]
[Parameter(HelpMessage = "Source Azure Storage Context Object", ParameterSetName = UriParameterSet)]
- public new AzureStorageContext Context { get; set; }
+ public override AzureStorageContext Context { get; set; }
[Parameter(HelpMessage = "Destination Storage context object", Mandatory = false)]
public AzureStorageContext DestContext { get; set; }
diff --git a/src/Common/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs b/src/Common/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs
index 8c8df3fa560e..a7f68fb4ef31 100644
--- a/src/Common/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs
+++ b/src/Common/Storage/Commands.Storage/Common/StorageCloudCmdletBase.cs
@@ -43,7 +43,7 @@ public class StorageCloudCmdletBase : CloudBaseCmdlet
{
[Parameter(HelpMessage = "Azure Storage Context Object",
ValueFromPipelineByPropertyName = true)]
- public AzureStorageContext Context { get; set; }
+ public virtual AzureStorageContext Context { get; set; }
[Parameter(HelpMessage = "The server time out for each request in seconds.")]
public virtual int? ServerTimeoutPerRequest { get; set; }
diff --git a/src/Common/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs b/src/Common/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs
index 246d17e10a8f..351b6b81007b 100644
--- a/src/Common/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs
+++ b/src/Common/Storage/Commands.Storage/File/AzureStorageFileCmdletBase.cs
@@ -34,7 +34,7 @@ public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase
/// Execute command
diff --git a/src/Common/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs b/src/Common/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs
index 0674dec7fa8c..063b8e6e82b5 100644
--- a/src/Common/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs
+++ b/src/Common/Storage/Commands.Storage/File/Cmdlet/NewAzureStorageShareSasToken.cs
@@ -68,7 +68,7 @@ public string Policy
[Parameter(
ValueFromPipeline = true,
HelpMessage = "Azure Storage Context Object")]
- public new AzureStorageContext Context { get; set; }
+ public override AzureStorageContext Context { get; set; }
// Overwrite the useless parameter
public override int? ServerTimeoutPerRequest { get; set; }
diff --git a/src/Common/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs b/src/Common/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs
index ca5ce511532c..d352c84f3d0e 100644
--- a/src/Common/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs
+++ b/src/Common/Storage/Commands.Storage/File/Cmdlet/StartAzureStorageFileCopy.cs
@@ -120,7 +120,7 @@ public class StartAzureStorageFileCopyCommand : StorageFileDataManagementCmdletB
Mandatory = false,
ValueFromPipelineByPropertyName = true,
ParameterSetName = ShareNameParameterSet)]
- public new AzureStorageContext Context { get; set; }
+ public override AzureStorageContext Context { get; set; }
[Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ContainerNameParameterSet)]
[Parameter(HelpMessage = "Destination Storage context object", ParameterSetName = ContainerParameterSet)]
diff --git a/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml b/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml
index 1dd5bcef916a..e54b3004d14a 100644
--- a/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml
+++ b/src/Common/Storage/Commands.Storage/Microsoft.WindowsAzure.Commands.Storage.types.ps1xml
@@ -1,37 +1,3 @@
-
- Microsoft.WindowsAzure.Storage.File.CloudFile
-
-
- DirectoryTag
- [string]::Empty
-
-
- IsDirectory
- $false
-
-
- Length
- $_.Properties.Length
-
-
-
-
- Microsoft.WindowsAzure.Storage.File.CloudFileDirectory
-
-
- DirectoryTag
- "DIR"
-
-
- IsDirectory
- $true
-
-
- Length
- [string]::Empty
-
-
-
\ No newline at end of file
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml b/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml
index 430ffff8f2cc..e9696daafb6f 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml
@@ -121,7 +121,7 @@
PS C:\>
PS C:\> #Get one storage account
- Get-AzureRmStorageAccount -ResourceGroupName "RG1" -AccountName "myStorageAccount"
+ Get-AzureRmStorageAccount -ResourceGroupName "rg1" -AccountName "mystorageaccount"
@@ -304,7 +304,7 @@
PS C:\>
#Get keys
- Get-AzureRmStorageAccountKey -ResourceGroupName "RG1" -AccountName "myStorageAccount"
+ Get-AzureRmStorageAccountKey -ResourceGroupName "rg1" -AccountName "mystorageaccount"
@@ -375,6 +375,13 @@
String
+
+ Tags
+
+ Tags to set on the storage account.
+
+ Hashtable[]
+
Profile
@@ -437,6 +444,18 @@
+
+ Tags
+
+ Tags to set on the storage account.
+
+ Hashtable[]
+
+ Hashtable[]
+
+
+
+
Profile
@@ -490,7 +509,7 @@
PS C:\>
- New-AzureRmStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -Location "US West" -Type "Standard_GRS"
+ New-AzureRmStorageAccount -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -Location "US West" -Type "Standard_GRS"
@@ -654,7 +673,7 @@
PS C:\>
#Regenerate a key
-New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -keyName "key1"
+New-AzureRmStorageKey -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -keyName "key1"
@@ -794,7 +813,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
PS C:\>
- PS C:\> Remove-AzureRmStorageAccount -ResourceGroupName "RG1" -AccountName "myStorageAccount"
+ PS C:\> Remove-AzureRmStorageAccount -ResourceGroupName "rg1" -AccountName "mystorageaccount"
@@ -894,7 +913,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
UseSubDomain
-
+ Indicates whether indirect CName validation is enabled.
Nullable`1[Boolean]
@@ -925,7 +944,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
Tags
-
+ Tags to set on the storage account.
Hashtable[]
@@ -1008,7 +1027,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
UseSubDomain
-
+ Indicates whether indirect CName validation is enabled.
Nullable`1[Boolean]
@@ -1020,7 +1039,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
Tags
-
+ Tags to set on the storage account.
Hashtable[]
@@ -1029,18 +1048,6 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
-
- UseSubDomainName
-
-
-
- nullable`1[boolean]
-
- nullable`1[boolean]
-
-
-
-
@@ -1083,7 +1090,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
PS C:\>
PS C:\> # Set account type
- Set-AzureRmStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -Type "Standard_RAGRS"
+ Set-AzureRmStorageAccount -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -Type "Standard_RAGRS"
@@ -1104,7 +1111,7 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
PS C:\>
PS C:\> #Set custom domain
- Set-AzureRmStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -CustomDomainName "domain name" –UseSubDomain “true”
+ Set-AzureRmStorageAccount -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -CustomDomainName "www.domainname.com" –UseSubDomain $true
@@ -1123,4 +1130,4 @@ New-AzureRmStorageKey -ResourceGroupName "myResourceGroup" -AccountNam
-
\ No newline at end of file
+
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs
index 4fda789c9d57..66c0035e255c 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs
@@ -12,7 +12,9 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
+using System.Collections;
using System.Management.Automation;
+using Microsoft.Azure.Commands.Tags.Model;
using Microsoft.Azure.Management.Storage;
using Microsoft.Azure.Management.Storage.Models;
@@ -60,6 +62,14 @@ public class NewAzureStorageAccountCommand : StorageAccountBaseCmdlet
[ValidateNotNullOrEmpty]
public string Location { get; set; }
+ [Parameter(
+ Position = 4,
+ Mandatory = false,
+ ValueFromPipelineByPropertyName = true,
+ HelpMessage = "Storage Account Tags.")]
+ [ValidateNotNull]
+ public Hashtable[] Tags { get; set; }
+
protected override void ProcessRecord()
{
base.ProcessRecord();
@@ -67,7 +77,8 @@ protected override void ProcessRecord()
StorageAccountCreateParameters createParameters = new StorageAccountCreateParameters()
{
Location = this.Location,
- AccountType = ParseAccountType(this.Type)
+ AccountType = ParseAccountType(this.Type),
+ Tags = TagsConversionHelper.CreateTagDictionary(Tags, validate: true)
};
var createAccountResponse = this.StorageClient.StorageAccounts.Create(
diff --git a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs
index 44021f577768..62c01daf4131 100644
--- a/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs
+++ b/src/ResourceManager/Storage/Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs
@@ -69,7 +69,8 @@ public class SetAzureStorageAccountCommand : StorageAccountBaseCmdlet
ParameterSetName = UpdateCustomDomainParamSet,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Storage Account Custom Domain Name.")]
- [ValidateNotNullOrEmpty]
+ [AllowEmptyString]
+ [ValidateNotNull]
public string CustomDomainName { get; set; }
[Parameter(
@@ -86,7 +87,8 @@ public class SetAzureStorageAccountCommand : StorageAccountBaseCmdlet
ParameterSetName = UpdateTagsParamSet,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Storage Account Tags.")]
- [ValidateNotNullOrEmpty]
+ [AllowEmptyCollection]
+ [ValidateNotNull]
public Hashtable[] Tags { get; set; }
protected override void ProcessRecord()
@@ -120,7 +122,7 @@ protected override void ProcessRecord()
updateParameters = new StorageAccountUpdateParameters
{
- Tags = tagDictionary
+ Tags = tagDictionary ?? new Dictionary()
};
}