From 8af996fd588bcbe7eef76f74dd930c3697c91078 Mon Sep 17 00:00:00 2001 From: Yifan Zhang Date: Mon, 30 Jan 2023 13:14:28 +0800 Subject: [PATCH] fix help --- .../help/Add-AzStorageAccountNetworkRule.md | 6 ++++++ .../Storage.Management/help/Close-AzStorageFileHandle.md | 3 +++ .../Storage.Management/help/Copy-AzStorageBlob.md | 5 +++++ .../help/Disable-AzStorageBlobLastAccessTimeTracking.md | 1 + .../help/Disable-AzStorageBlobRestorePolicy.md | 1 + .../help/Disable-AzStorageDeleteRetentionPolicy.md | 1 + .../help/Disable-AzStorageStaticWebsite.md | 1 + .../help/Enable-AzStorageDeleteRetentionPolicy.md | 1 + .../help/Enable-AzStorageStaticWebsite.md | 1 + .../help/Get-AzDataLakeGen2ChildItem.md | 1 + .../Storage.Management/help/Get-AzRmStorageContainer.md | 3 +++ .../help/Get-AzRmStorageContainerImmutabilityPolicy.md | 3 +++ .../Storage.Management/help/Get-AzStorageAccount.md | 3 +++ .../Storage.Management/help/Get-AzStorageAccountKey.md | 2 ++ .../help/Get-AzStorageAccountNameAvailability.md | 1 + .../help/Get-AzStorageAccountNetworkRuleSet.md | 1 + .../help/Get-AzStorageBlobCopyState.md | 4 ++++ .../Storage.Management/help/Get-AzStorageCORSRule.md | 1 + .../Storage.Management/help/Get-AzStorageContainer.md | 2 ++ .../help/Get-AzStorageContainerStoredAccessPolicy.md | 2 ++ .../Storage.Management/help/Get-AzStorageFileContent.md | 3 +++ .../Storage.Management/help/Get-AzStorageQueue.md | 3 +++ .../help/Get-AzStorageQueueStoredAccessPolicy.md | 2 ++ .../help/Get-AzStorageServiceLoggingProperty.md | 1 + .../help/Get-AzStorageServiceMetricsProperty.md | 1 + .../Storage.Management/help/Get-AzStorageShare.md | 4 ++++ .../Storage.Management/help/Get-AzStorageTable.md | 3 +++ .../help/Get-AzStorageTableStoredAccessPolicy.md | 2 ++ .../help/Lock-AzRmStorageContainerImmutabilityPolicy.md | 4 ++++ .../Storage.Management/help/New-AzRmStorageContainer.md | 2 ++ .../Storage.Management/help/New-AzStorageAccountKey.md | 1 + .../help/New-AzStorageBlobRangeToRestore.md | 4 ++++ .../Storage.Management/help/New-AzStorageContainer.md | 2 ++ .../help/New-AzStorageContainerStoredAccessPolicy.md | 1 + .../Storage.Management/help/New-AzStorageQueue.md | 2 ++ .../help/New-AzStorageQueueSASToken.md | 1 + .../help/New-AzStorageQueueStoredAccessPolicy.md | 1 + .../Storage.Management/help/New-AzStorageTable.md | 2 ++ .../help/New-AzStorageTableSASToken.md | 3 +++ .../help/New-AzStorageTableStoredAccessPolicy.md | 1 + .../Storage.Management/help/Remove-AzDataLakeGen2Item.md | 3 +++ .../help/Remove-AzRmStorageContainer.md | 3 +++ .../Remove-AzRmStorageContainerImmutabilityPolicy.md | 4 ++++ .../help/Remove-AzRmStorageContainerLegalHold.md | 3 +++ .../Storage.Management/help/Remove-AzStorageAccount.md | 1 + .../help/Remove-AzStorageAccountManagementPolicy.md | 1 + .../help/Remove-AzStorageAccountNetworkRule.md | 8 +++++++- .../Storage.Management/help/Remove-AzStorageBlob.md | 5 +++++ .../help/Remove-AzStorageBlobInventoryPolicy.md | 1 + .../Storage.Management/help/Remove-AzStorageCORSRule.md | 1 + .../Storage.Management/help/Remove-AzStorageContainer.md | 1 + .../help/Remove-AzStorageContainerStoredAccessPolicy.md | 1 + .../Storage.Management/help/Remove-AzStorageFile.md | 2 ++ .../Storage.Management/help/Remove-AzStorageQueue.md | 2 ++ .../help/Remove-AzStorageQueueStoredAccessPolicy.md | 1 + .../Storage.Management/help/Remove-AzStorageShare.md | 2 ++ .../Storage.Management/help/Remove-AzStorageTable.md | 2 ++ .../help/Remove-AzStorageTableStoredAccessPolicy.md | 1 + .../help/Revoke-AzStorageAccountUserDelegationKeys.md | 1 + .../help/Set-AzCurrentStorageAccount.md | 1 + .../help/Set-AzStorageAccountManagementPolicy.md | 1 + .../Storage.Management/help/Set-AzStorageBlobContent.md | 5 +++++ .../Storage.Management/help/Set-AzStorageCORSRule.md | 2 ++ .../Storage.Management/help/Set-AzStorageContainerAcl.md | 2 ++ .../help/Set-AzStorageContainerStoredAccessPolicy.md | 1 + .../Storage.Management/help/Set-AzStorageFileContent.md | 2 ++ .../help/Set-AzStorageQueueStoredAccessPolicy.md | 1 + .../help/Set-AzStorageServiceLoggingProperty.md | 1 + .../help/Set-AzStorageServiceMetricsProperty.md | 1 + .../help/Set-AzStorageTableStoredAccessPolicy.md | 1 + .../help/Start-AzStorageBlobIncrementalCopy.md | 4 ++++ .../Storage.Management/help/Stop-AzStorageBlobCopy.md | 3 +++ .../help/Update-AzRmStorageContainer.md | 3 +++ .../Storage.Management/help/Update-AzRmStorageShare.md | 1 + .../help/Update-AzStorageAccountNetworkRuleSet.md | 9 ++++++--- .../help/Update-AzStorageServiceProperty.md | 1 + 76 files changed, 164 insertions(+), 4 deletions(-) diff --git a/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md b/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md index cea4a10c2128..babeddcd82c7 100644 --- a/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md +++ b/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md @@ -58,6 +58,7 @@ The **Add-AzStorageAccountNetworkRule** cmdlet adds IpRules or VirtualNetworkRul ## EXAMPLES ### Example 1: Add several IpRules with IPAddressOrRange + ``` PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -IPAddressOrRange "10.0.0.0/7","28.2.0.0/16" ``` @@ -65,6 +66,7 @@ PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Nam This command add several IpRules with IPAddressOrRange. ### Example 2: Add a VirtualNetworkRule with VirtualNetworkResourceID + ``` PS C:\>$subnet = Get-AzVirtualNetwork -ResourceGroupName "myResourceGroup" -Name "myvirtualnetwork" | Get-AzVirtualNetworkSubnetConfig PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -VirtualNetworkResourceId $subnet[0].Id @@ -73,6 +75,7 @@ PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Nam This command add a VirtualNetworkRule with VirtualNetworkResourceID. ### Example 3: Add VirtualNetworkRules with VirtualNetworkRule Objects from another account + ``` PS C:\> $networkrule = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount1" PS C:\> Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount2" -VirtualNetworkRule $networkrule.VirtualNetworkRules @@ -81,6 +84,7 @@ PS C:\> Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Na This command add VirtualNetworkRules with VirtualNetworkRule Objects from another account. ### Example 4: Add several IpRule with IpRule objects, input with JSON + ``` PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -IPRule (@{IPAddressOrRange="10.0.0.0/7";Action="allow"},@{IPAddressOrRange="28.2.0.0/16";Action="allow"}) ``` @@ -88,6 +92,7 @@ PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Nam This command add several IpRule with IpRule objects, input with JSON. ### Example 5: Add a resource access rule + ``` PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -TenantId $tenantId -ResourceId $ResourceId ``` @@ -95,6 +100,7 @@ PS C:\>Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Nam This command adds a resource access rule with TenantId and ResourceId. ### Example 6: Add all resource access rules of one storage account to another storage account + ``` PS C:\> (Get-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount1").ResourceAccessRules | Add-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount2" ``` diff --git a/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md b/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md index 02ebc701dc0f..28b176e31967 100644 --- a/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md +++ b/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md @@ -66,6 +66,7 @@ The **Close-AzStorageFileHandle** cmdlet closes file handles of a file share, o ## EXAMPLES ### Example 1: Close all file handles on a file + ``` PS C:\> Close-AzStorageFileHandle -ShareName "mysharename" -Path 'dir1/dir2/test.txt' -CloseAll ``` @@ -73,6 +74,7 @@ PS C:\> Close-AzStorageFileHandle -ShareName "mysharename" -Path 'dir1/dir2/test This command closes all file handles on a file. ### Example 2: Close all file handles which is opened 1 day ago on a file directory + ``` PS C:\> Get-AzStorageFileHandle -ShareName "mysharename" -Path 'dir1/dir2' -Recursive | Where-Object {$_.OpenTime.DateTime.AddDays(1) -lt (Get-Date)} | Close-AzStorageFileHandle -ShareName "mysharename" ``` @@ -89,6 +91,7 @@ PS C:\> Close-AzStorageFileHandle -ShareName "mysharename" -Path 'dir1/dir2' -Re This command closes all file handles on a file directory and shows the closed file handle count. ### Example 4: Close all file handles on a file share + ``` PS C:\> Close-AzStorageFileHandle -ShareName "mysharename" -CloseAll -Recursive ``` diff --git a/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md b/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md index f5d7d688a07d..5cd055a970af 100644 --- a/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md +++ b/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md @@ -42,6 +42,7 @@ The **Copy-AzStorageBlob** cmdlet copies a blob synchronously, currently only su ## EXAMPLES ### Example 1: Copy a named blob to another + ``` $destBlob = Copy-AzStorageBlob -SrcContainer "sourcecontainername" -SrcBlob "srcblobname" -DestContainer "destcontainername" -DestBlob "destblobname" ``` @@ -49,6 +50,7 @@ $destBlob = Copy-AzStorageBlob -SrcContainer "sourcecontainername" -SrcBlob "src This command copies a blob from source container to the destination container with a new blob name. ### Example 2: Copy blob from a blob object + ``` $srcBlob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx $destBlob = $srcBlob | Copy-AzStorageBlob -DestContainer "destcontainername" -DestBlob "destblobname" @@ -57,6 +59,7 @@ $destBlob = $srcBlob | Copy-AzStorageBlob -DestContainer "destcontainername" - This command copies a blob from source blob object to the destination container with a new blob name. ### Example 3: Copy blob from a blob Uri + ``` $srcBlobUri = New-AzStorageBlobSASToken -Container $srcContainerName -Blob $srcBlobName -Permission rt -ExpiryTime (Get-Date).AddDays(7) -FullUri $destBlob = Copy-AzStorageBlob -AbsoluteUri $srcBlobUri -DestContainer "destcontainername" -DestBlob "destblobname" @@ -65,6 +68,7 @@ $destBlob = Copy-AzStorageBlob -AbsoluteUri $srcBlobUri -DestContainer "destcont The first command creates a blob Uri of the source blob, with sas token of permission "rt". The second command copies from source blob Uri to the destination blob. ### Example 4: Update a block blob encryption scope + ``` $blob = Copy-AzStorageBlob -SrcContainer $containerName -SrcBlob $blobname -DestContainer $containername -EncryptionScope $newScopeName -Force ``` @@ -72,6 +76,7 @@ $blob = Copy-AzStorageBlob -SrcContainer $containerName -SrcBlob $blobname -Dest This command update a block blob encryption scope by copy it to itself with a new encryption scope. ### Example 5: Copy a blob to a new append blob + ``` $srcBlob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx $destBlob = Copy-AzStorageBlob -SrcContainer "sourcecontainername" -SrcBlob "srcblobname" -DestContainer "destcontainername" -DestBlob "destblobname" -DestBlobType "Append" -DestContext $destCtx diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md b/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md index 88997d3d9696..b1e0e7591a0d 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md @@ -30,6 +30,7 @@ The **Disable-AzStorageBlobDeleteRetentionPolicy** cmdlet disables delete retent ## EXAMPLES ### Example 1: Disable last access time tracking for the Blob service + ``` C:\PS>Disable-AzStorageBlobLastAccessTimeTracking -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md b/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md index cb62fb359b3c..6ab960247e01 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md @@ -36,6 +36,7 @@ The **Disable-AzStorageBlobRestorePolicy** cmdlet disables Blob Restore Policy f ## EXAMPLES ### Example 1: Disables Blob Restore Policy for the Azure Storage Blob service on a Storage account + ```powershell PS C:\> Disable-AzStorageBlobRestorePolicy -ResourceGroupName "myresourcegoup" -StorageAccountName "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md index 755e0db67e02..23e2638d12e9 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md @@ -23,6 +23,7 @@ The **Disable-AzStorageDeleteRetentionPolicy** cmdlet disables delete retention ## EXAMPLES ### Example 1: Disable delete retention policy for the Blob service + ``` C:\PS>Disable-AzStorageDeleteRetentionPolicy ``` diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md b/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md index d3de72acd699..23d686c263b6 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md @@ -23,6 +23,7 @@ The **Disable-AzStorageStaticWebsite** cmdlet disables static website for the Az ## EXAMPLES ### Example 1: Disable static website for a Azure Storage account + ``` C:\PS>Disable-AzStorageStaticWebsite ``` diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md index f5fa3beeef90..31ff59aab655 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md @@ -23,6 +23,7 @@ The **Enable-AzStorageDeleteRetentionPolicy** cmdlet enables delete retention po ## EXAMPLES ### Example 1: Enable delete retention policy for the Blob service + ``` C:\PS>Enable-AzStorageDeleteRetentionPolicy -RetentionDays 3 ``` diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md b/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md index e02dc2268ac6..cdb4c4bd34f1 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md @@ -24,6 +24,7 @@ The **Enable-AzStorageStaticWebsite** cmdlet enables static website for the Azur ## EXAMPLES ### Example 1: Enable static website for the Azure Storage account + ``` C:\PS>Enable-AzStorageStaticWebsite -IndexDocument $indexdoc -ErrorDocument404Path $errordoc ``` diff --git a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md index bc95f1331b2a..ac3946b59ef9 100644 --- a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md +++ b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md @@ -56,6 +56,7 @@ dir1/testfile_1K_0 False 1024 2020-03-23 09:29:21Z rw-r----- This command lists the direct sub items from a Filesystem ### Example 3: List items recursively from a Filesystem in multiple batches + ``` PS C:\> $MaxReturn = 1000 PS C:\> $FileSystemName = "filesystem1" diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md index c26cf91c8e18..5fc05bd77867 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md @@ -30,6 +30,7 @@ The **Get-AzRmStorageContainer** cmdlet gets or lists Storage blob containers ## EXAMPLES ### Example 1: Get a Storage blob container with Storage account name and container name + ``` PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" ``` @@ -37,6 +38,7 @@ PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountNam This command gets a Storage blob container with Storage account name and container name. ### Example 2: List all Storage blob containers of a Storage account + ``` PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" ``` @@ -44,6 +46,7 @@ PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountNam This command lists all Storage blob containers of a Storage account with Storage account name. ### Example 3: Get a Storage blob container with Storage account object and container name. + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>Get-AzRmStorageContainer -StorageAccount $accountObject -ContainerName "myContainer" diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md index 4bd90348d1bb..d78cb5412943 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md @@ -36,6 +36,7 @@ The **Get-AzRmStorageContainerImmutabilityPolicy** cmdlet gets ImmutabilityPolic ## EXAMPLES ### Example 1: Get ImmutabilityPolicy of a Storage blob container with Storage account name and container name + ``` PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" ``` @@ -43,6 +44,7 @@ PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResource This command gets ImmutabilityPolicy of a Storage blob container with Storage account name and container name. ### Example 2: Get ImmutabilityPolicy of a Storage blob container with Storage account object and container name + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObject -ContainerName "myContainer" @@ -51,6 +53,7 @@ PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObject This command gets ImmutabilityPolicy of a Storage blob containers with Storage account object and container name. ### Example 3: Get ImmutabilityPolicy of a Storage blob container with Storage container object + ``` PS C:\>$containerObject = Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -Name "myContainer" PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -Container $containerObject diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccount.md b/src/Storage/Storage.Management/help/Get-AzStorageAccount.md index 396289294a63..f381548e0762 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccount.md @@ -37,6 +37,7 @@ The **Get-AzStorageAccount** cmdlet gets a specified Storage account or all of t ## EXAMPLES ### Example 1: Get a specified Storage account + ``` PS C:\>Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" ``` @@ -44,6 +45,7 @@ PS C:\>Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" This command gets the specified Storage account. ### Example 2: Get all Storage accounts in a resource group + ``` PS C:\>Get-AzStorageAccount -ResourceGroupName "RG01" ``` @@ -51,6 +53,7 @@ PS C:\>Get-AzStorageAccount -ResourceGroupName "RG01" This command gets all of the Storage accounts in a resource group. ### Example 3: Get all Storage accounts in the subscription + ``` PS C:\>Get-AzStorageAccount ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md index 85b1b813685d..f51114529639 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md @@ -24,6 +24,7 @@ The **Get-AzStorageAccountKey** cmdlet gets the access keys for an Azure Storage ## EXAMPLES ### Example 1: Get the access keys for a Storage account + ``` PS C:\>Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount" ``` @@ -47,6 +48,7 @@ PS C:\>(Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccoun ``` ### Example 3: Lists the access keys for a Storage account, include the Kerberos keys (if active directory enabled) + ``` PS C:\>Get-AzStorageAccountKey -ResourceGroupName "RG01" -Name "mystorageaccount" -ListKerbKey ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md index 6d3cccca5865..726a89ef9887 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md @@ -24,6 +24,7 @@ The **Get-AzStorageAccountNameAvailability** cmdlet checks whether the name of a ## EXAMPLES ### Example 1: Check availability of a Storage account name + ``` PS C:\>Get-AzStorageAccountNameAvailability -Name 'contosostorage03' ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md index f21da8723df2..c7890dfc8c59 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md @@ -23,6 +23,7 @@ The **Get-AzStorageAccountNetworkRuleSet** cmdlet gets the NetworkRule property ## EXAMPLES ### Example 1: Get NetworkRule property of a specified Storage account + ``` PS C:\> Get-AzStorageAccountNetworkRuleSet -ResourceGroupName "rg1" -Name "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md index b5baa1c5f787..666ac18eb828 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md @@ -41,6 +41,7 @@ It should run on the copy destination blob. ## EXAMPLES ### Example 1: Get the copy status of a blob + ``` C:\PS>Get-AzStorageBlobCopyState -Blob "ContosoPlanning2015" -Container "ContosoUploads" ``` @@ -48,6 +49,7 @@ C:\PS>Get-AzStorageBlobCopyState -Blob "ContosoPlanning2015" -Container "Contoso This command gets the copy status of the blob named ContosoPlanning2015 in the container ContosoUploads. ### Example 2: Get the copy status for of a blob by using the pipeline + ``` C:\PS>Get-AzStorageBlob -Blob "ContosoPlanning2015" -Container "ContosoUploads" | Get-AzStorageBlobCopyState ``` @@ -56,6 +58,7 @@ This command gets the blob named ContosoPlanning2015 in the container named Cont The **Get-AzStorageBlobCopyState** cmdlet gets the copy status for that blob. ### Example 3: Get the copy status for a blob in a container by using the pipeline + ``` C:\PS>Get-AzStorageContainer -Name "ContosoUploads" | Get-AzStorageBlobCopyState -Blob "ContosoPlanning2015" ``` @@ -64,6 +67,7 @@ This command gets the container named by using the **Get-AzStorageBlob** cmdlet, The **Get-AzStorageContainer** cmdlet gets the copy status for the blob named ContosoPlanning2015 in that container. ### Example 4: Start Copy and pipeline to get the copy status + ``` C:\PS> $destBlob = Start-AzStorageBlobCopy -SrcContainer "contosouploads" -SrcBlob "ContosoPlanning2015" -DestContainer "contosouploads2" -DestBlob "ContosoPlanning2015_copy" diff --git a/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md b/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md index 9771dee17aab..d6237033e4d9 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md @@ -25,6 +25,7 @@ The **Get-AzStorageCORSRule** cmdlet gets Cross-Origin Resource Sharing (CORS) r ## EXAMPLES ### Example 1: Get CORS rules of blob service + ``` PS C:\>Get-AzStorageCORSRule -ServiceType Blob ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageContainer.md b/src/Storage/Storage.Management/help/Get-AzStorageContainer.md index 06ef52c45f0c..a4f1c809aee9 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageContainer.md @@ -35,6 +35,7 @@ The **Get-AzStorageContainer** cmdlet lists the storage containers associated wi ## EXAMPLES ### Example 1: Get Azure Storage container by name + ``` PS C:\>Get-AzStorageContainer -Name container* ``` @@ -42,6 +43,7 @@ PS C:\>Get-AzStorageContainer -Name container* This example uses a wildcard character to return a list of all containers with a name that starts with container. ### Example 2: Get Azure Storage container by container name prefix + ``` PS C:\>Get-AzStorageContainer -Prefix "container" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md index 158479e6ec9d..7eb30839485a 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **Get-AzStorageContainerStoredAccessPolicy** cmdlet lists the stored access ## EXAMPLES ### Example 1: Get a stored access policy in a storage container + ``` PS C:\>Get-AzStorageContainerStoredAccessPolicy -Container "Container07" -Policy "Policy22" ``` @@ -32,6 +33,7 @@ PS C:\>Get-AzStorageContainerStoredAccessPolicy -Container "Container07" -Policy This command gets the access policy named Policy22 in the storage container named Container07. ### Example 2: Get all the stored access policies in a storage container + ``` PS C:\>Get-AzStorageContainerStoredAccessPolicy -Container "Container07" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md b/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md index 8b577d3a35c4..cd4d2517fb7f 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md @@ -52,6 +52,7 @@ This cmdlet does not return the contents of the file. ## EXAMPLES ### Example 1: Download a file from a folder + ``` PS C:\>Get-AzStorageFileContent -ShareName "ContosoShare06" -Path "ContosoWorkingFolder/CurrentDataFile" ``` @@ -59,6 +60,7 @@ PS C:\>Get-AzStorageFileContent -ShareName "ContosoShare06" -Path "ContosoWorkin This command downloads a file that is named CurrentDataFile in the folder ContosoWorkingFolder from the file share ContosoShare06 to current folder. ### Example 2: Downloads the files under sample file share + ``` PS C:\>Get-AzStorageFile -ShareName sample | Where-Object {$_.GetType().Name -eq "CloudFile"} | Get-AzStorageFileContent ``` @@ -66,6 +68,7 @@ PS C:\>Get-AzStorageFile -ShareName sample | Where-Object {$_.GetType().Name -eq This example downloads the files under sample file share ### Example 3: Download an Azure file to a local file, and perserve the Azure File SMB properties (File Attributtes, File Creation Time, File Last Write Time) in the local file. + ``` PS C:\>Get-AzStorageFileContent -ShareName sample -Path "dir1/file1" -Destination $localFilePath -PreserveSMBAttribute ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageQueue.md b/src/Storage/Storage.Management/help/Get-AzStorageQueue.md index 8ad966fc15e1..d7de8843b24f 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageQueue.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageQueue.md @@ -31,6 +31,7 @@ The **Get-AzStorageQueue** cmdlet lists storage queues associated with an Azure ## EXAMPLES ### Example 1: List all Azure Storage queues + ``` PS C:\>Get-AzStorageQueue ``` @@ -38,6 +39,7 @@ PS C:\>Get-AzStorageQueue This command gets a list of all storage queues for the current Storage account. ### Example 2: List Azure Storage queues using a wildcard character + ``` PS C:\>Get-AzStorageQueue -Name queue* ``` @@ -45,6 +47,7 @@ PS C:\>Get-AzStorageQueue -Name queue* This command uses a wildcard character to get a list of storage queues whose name starts with queue. ### Example 3: List Azure Storage queues using queue name prefix + ``` PS C:\>Get-AzStorageQueue -Prefix "queue" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md index ca9ef7ae125c..18c1bc42ed15 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md @@ -24,6 +24,7 @@ The **Get-AzStorageQueueStoredAccessPolicy** cmdlet lists the stored access poli ## EXAMPLES ### Example 1: Get a stored access policy in the queue + ``` PS C:\>Get-AzStorageQueueStoredAccessPolicy -Queue "MyQueue" -Policy "Policy12" ``` @@ -31,6 +32,7 @@ PS C:\>Get-AzStorageQueueStoredAccessPolicy -Queue "MyQueue" -Policy "Policy12" This command gets the access policy named Policy12 in the storage queue named MyQueue. ### Example 2: Get all stored access policies in the queue + ``` PS C:\>Get-AzStorageQueueStoredAccessPolicy -Queue "MyQueue" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md index 936b785fe406..2ab2a84e5082 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md @@ -24,6 +24,7 @@ The **Get-AzStorageServiceLoggingProperty** cmdlet gets logging properties for A ## EXAMPLES ### Example 1: Get logging properties for the Blob service + ``` C:\PS>Get-AzStorageServiceLoggingProperty -ServiceType Blob ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md index 51e0e23a0194..bc857c58f49a 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md @@ -24,6 +24,7 @@ The **Get-AzStorageServiceMetricsProperty** cmdlet gets metrics properties for t ## EXAMPLES ### Example 1: Get metrics properties for the Blob service + ``` C:\PS>Get-AzStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageShare.md b/src/Storage/Storage.Management/help/Get-AzStorageShare.md index 67730c0616d1..985727cff0ce 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageShare.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageShare.md @@ -33,6 +33,7 @@ The **Get-AzStorageShare** cmdlet gets a list of file shares for a storage accou ## EXAMPLES ### Example 1: Get a file share + ``` PS C:\>Get-AzStorageShare -Name "ContosoShare06" ``` @@ -40,6 +41,7 @@ PS C:\>Get-AzStorageShare -Name "ContosoShare06" This command gets the file share named ContosoShare06. ### Example 2: Get all file shares that begin with a string + ``` PS C:\>Get-AzStorageShare -Prefix "Contoso" ``` @@ -47,6 +49,7 @@ PS C:\>Get-AzStorageShare -Prefix "Contoso" This command gets all file shares that have names that begin with Contoso. ### Example 3: Get all file shares in a specified context + ``` PS C:\>$Context = New-AzStorageContext -Local PS C:\> Get-AzStorageShare -Context $Context @@ -56,6 +59,7 @@ The first command uses the **New-AzStorageContext** cmdlet to create a context b The second command gets the file shares for the context object stored in $Context. ### Example 4: Get a file share snapshot with specific share name and SnapshotTime + ``` PS C:\>Get-AzStorageShare -Name "ContosoShare06" -SnapshotTime "6/16/2017 9:48:41 AM +00:00" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageTable.md b/src/Storage/Storage.Management/help/Get-AzStorageTable.md index 0324f0477091..02b33d3ae013 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageTable.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageTable.md @@ -31,6 +31,7 @@ The **Get-AzStorageTable** cmdlet lists the storage tables associated with the s ## EXAMPLES ### Example 1: List all Azure Storage tables + ``` PS C:\>Get-AzStorageTable ``` @@ -38,6 +39,7 @@ PS C:\>Get-AzStorageTable This command gets all storage tables for a Storage account. ### Example 2: List Azure Storage tables using a wildcard character + ``` PS C:\>Get-AzStorageTable -Name table* ``` @@ -45,6 +47,7 @@ PS C:\>Get-AzStorageTable -Name table* This command uses a wildcard character to get storage tables whose name starts with table. ### Example 3: List Azure Storage tables using table name prefix + ``` PS C:\>Get-AzStorageTable -Prefix "table" ``` diff --git a/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md index b86d405bbaa7..0057a7ee0625 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md @@ -24,6 +24,7 @@ The **Get-AzStorageTableStoredAccessPolicy** cmdlet lists the stored access poli ## EXAMPLES ### Example 1: Get a stored access policy in a storage table + ``` PS C:\>Get-AzStorageTableStoredAccessPolicy -Table "Table02" -Policy "Policy50" ``` @@ -31,6 +32,7 @@ PS C:\>Get-AzStorageTableStoredAccessPolicy -Table "Table02" -Policy "Policy50" This command gets the access policy named Policy50 in the storage table named Table02. ### Example 2: Get all stored access policies in a storage table + ``` PS C:\>Get-AzStorageTableStoredAccessPolicy -Table "Table02" ``` diff --git a/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md index e3c663c22525..fd9913bab3f7 100644 --- a/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md @@ -43,6 +43,7 @@ The **Lock-AzRmStorageContainerImmutabilityPolicy** cmdlet locks ImmutabilityPol ## EXAMPLES ### Example 1: Lock ImmutabilityPolicy of a Storage blob container with Storage account name and container name + ``` PS C:\>$policy = Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" PS C:\>Lock-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" -Etag $policy.Etag @@ -51,6 +52,7 @@ PS C:\>Lock-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourc This command Locks ImmutabilityPolicy of a Storage blob container with Storage account name and container name. ### Example 2: Lock ImmutabilityPolicy of a Storage blob container, with Storage account object + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>$policy = Get-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObject -ContainerName "myContainer" @@ -60,6 +62,7 @@ PS C:\>Lock-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObjec This command locks ImmutabilityPolicy of a Storage blob container, with Storage account object. ### Example 3: Lock ImmutabilityPolicyof a Storage blob container, with container object + ``` PS C:\>$containerObject = Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -Name "myContainer" PS C:\>$policy = Get-AzRmStorageContainerImmutabilityPolicy -Container $containerObject @@ -69,6 +72,7 @@ PS C:\>Lock-AzRmStorageContainerImmutabilityPolicy -Container $containerObject - This command locks ImmutabilityPolicy of a Storage blob container with Storage container object. ### Example 4: Lock ImmutabilityPolicy of a Storage blob container, with ImmutabilityPolicy object + ``` PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" | Lock-AzRmStorageContainerImmutabilityPolicy -Force ``` diff --git a/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md index 6c9de2ec1dc7..40520308c91a 100644 --- a/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md @@ -48,6 +48,7 @@ The **New-AzRmStorageContainer** cmdlet creates a Storage blob container ## EXAMPLES ### Example 1: Create a Storage blob container with Storage account name and container name, with metadata + ``` PS C:\>New-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" -Metadata @{tag0="value0";tag1="value1";tag2="value2"} ``` @@ -55,6 +56,7 @@ PS C:\>New-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountNam This command creates a Storage blob container with Storage account name and container name, with metadata. ### Example 2: Create a Storage blob container with Storage account object and container name, with public access as Blob + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>New-AzRmStorageContainer -StorageAccount $accountObject -ContainerName "myContainer" -PublicAccess Blob diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md b/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md index b53a7ed42706..fe9bd2d6082b 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md @@ -24,6 +24,7 @@ The **New-AzStorageAccountKey** cmdlet regenerates a storage key for an Azure St ## EXAMPLES ### Example 1: Regenerate a storage key + ``` PS C:\>New-AzStorageAccountKey -ResourceGroupName "MyResourceGroup" -Name "mystorageaccount" -KeyName "key1" ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md b/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md index f821c7d8afbe..f2c70d2487a4 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md +++ b/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md @@ -23,6 +23,7 @@ The **New-AzStorageBlobRangeToRestore** cmdlet creates a Blob range object, whic ## EXAMPLES ### Example 1: Creates a blob range to restore + ```powershell PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange container1/blob1 -EndRange container2/blob2 ``` @@ -30,6 +31,7 @@ PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange container1/blob1 -E This command creates a blob range to restore, which starts at container1/blob1 (include), and ends at container2/blob2 (exclude). ### Example 2: Creates a blob range which will restore from first blob in alphabetical order, to a specific blob (exclude) + ```powershell PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange "" -EndRange container2/blob2 ``` @@ -37,6 +39,7 @@ PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange "" -EndRange contai This command creates a blob range which will restore from first blob of alphabetical order, to a specific blob container2/blob2 (exclude) ### Example 3: Creates a blob range which will restore from a specific blob (include), to the last blob in alphabetical order + ```powershell PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange container1/blob1 -EndRange "" ``` @@ -44,6 +47,7 @@ PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange container1/blob1 -E This command creates a blob range which will restore from a specific blob container1/blob1 (include), to the last blob in alphabetical order. ### Example 4: Creates a blob range which will restore all blobs + ```powershell PS C:\> $range = New-AzStorageBlobRangeToRestore -StartRange "" -EndRange "" ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageContainer.md b/src/Storage/Storage.Management/help/New-AzStorageContainer.md index fd255636e271..5812fac3ed4a 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/New-AzStorageContainer.md @@ -34,6 +34,7 @@ The **New-AzStorageContainer** cmdlet creates an Azure storage container. ## EXAMPLES ### Example 1: Create an Azure storage container + ``` PS C:\>New-AzStorageContainer -Name "ContainerName" -Permission Off ``` @@ -41,6 +42,7 @@ PS C:\>New-AzStorageContainer -Name "ContainerName" -Permission Off This command creates a storage container. ### Example 2: Create multiple Azure storage containers + ``` PS C:\>"container1 container2 container3".split() | New-AzStorageContainer -Permission Container ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md index bfab98151f13..8428225e6475 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md @@ -26,6 +26,7 @@ The **New-AzStorageContainerStoredAccessPolicy** cmdlet creates a stored access ## EXAMPLES ### Example 1: Create a stored access policy in a storage container + ``` PS C:\>New-AzStorageContainerStoredAccessPolicy -Container "MyContainer" -Policy "Policy01" ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageQueue.md b/src/Storage/Storage.Management/help/New-AzStorageQueue.md index dad13570a509..30c366a8c17e 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageQueue.md +++ b/src/Storage/Storage.Management/help/New-AzStorageQueue.md @@ -24,6 +24,7 @@ The **New-AzStorageQueue** cmdlet creates a storage queue in Azure. ## EXAMPLES ### Example 1: Create an Azure storage queue + ``` PS C:\>New-AzStorageQueue -Name "queueabc" ``` @@ -31,6 +32,7 @@ PS C:\>New-AzStorageQueue -Name "queueabc" This example creates a storage queue named queueabc. ### Example 2: Create multiple azure storage queues + ``` PS C:\>"queue1 queue2 queue3".split() | New-AzStorageQueue ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md index 748e917a7b2e..03b25dbac17d 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md @@ -33,6 +33,7 @@ The **New-AzStorageQueueSASToken** cmdlet generates shared access signature toke ## EXAMPLES ### Example 1: Generate a queue SAS token with full permission + ``` PS C:\>New-AzStorageQueueSASToken -Name "Test" -Permission raup ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md index c8a063b27a4a..65694bd5c707 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **New-AzStorageQueueStoredAccessPolicy** cmdlet creates a stored access poli ## EXAMPLES ### Example 1: Create a stored access policy in a storage queue + ``` PS C:\>New-AzStorageQueueStoredAccessPolicy -Queue "MyQueue" -Policy "Policy01" ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageTable.md b/src/Storage/Storage.Management/help/New-AzStorageTable.md index d7bc7fc6bcb5..1159e5e2c196 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageTable.md +++ b/src/Storage/Storage.Management/help/New-AzStorageTable.md @@ -24,6 +24,7 @@ The **New-AzStorageTable** cmdlet creates a storage table associated with the st ## EXAMPLES ### Example 1: Create an azure storage table + ``` PS C:\>New-AzStorageTable -Name "tableabc" ``` @@ -31,6 +32,7 @@ PS C:\>New-AzStorageTable -Name "tableabc" This command creates a storage table with a name of tableabc. ### Example 2: Create multiple azure storage tables + ``` PS C:\>"table1 table2 table3".split() | New-AzStorageTable ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md index 38cccef10a23..368821454c61 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md @@ -35,6 +35,7 @@ The **New-AzStorageTableSASToken** cmdlet generates a Shared Access Signature (S ## EXAMPLES ### Example 1: Generate an SAS token that has full permissions for a table + ``` C:\PS>New-AzStorageTableSASToken -Name "ContosoResources" -Permission "raud" ``` @@ -43,6 +44,7 @@ This command generates an SAS token with full permissions for the table named Co That token is for read, add, update, and delete permissions. ### Example 2: Generate an SAS token for a range of partitions + ``` C:\PS>New-AzStorageTableSASToken -Name "ContosoResources" -Permission "raud" -StartPartitionKey "a" -EndPartitionKey "b" ``` @@ -51,6 +53,7 @@ This command generates and SAS token with full permissions for the table named C The command limits the token to the range that the *StartPartitionKey* and *EndPartitionKey* parameters specify. ### Example 3: Generate an SAS token that has a stored access policy for a table + ``` C:\PS>New-AzStorageTableSASToken -Name "ContosoResources" -Policy "ClientPolicy01" ``` diff --git a/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md index 0aa4ea72e7c4..ea19aea1030a 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **New-AzStorageTableStoredAccessPolicy** cmdlet creates a stored access poli ## EXAMPLES ### Example 1: Create a stored access policy in a table + ``` PS C:\>New-AzStorageTableStoredAccessPolicy -Table "MyTable" -Policy "Policy02" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md b/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md index 111daee83068..4a45024c06ee 100644 --- a/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md +++ b/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md @@ -33,6 +33,7 @@ This cmdlet only works if Hierarchical Namespace is enabled for the Storage acco ## EXAMPLES ### Example 1: Removes a directory + ``` PS C:\>Remove-AzDataLakeGen2Item -FileSystem "filesystem1" -Path "dir1/" ``` @@ -40,6 +41,7 @@ PS C:\>Remove-AzDataLakeGen2Item -FileSystem "filesystem1" -Path "dir1/" This command removes a directory from a Filesystem. ### Example 2: Removes a file without prompt + ``` PS C:\>Remove-AzDataLakeGen2Item -FileSystem "filesystem1" -Path "dir1/file1" -Force ``` @@ -47,6 +49,7 @@ PS C:\>Remove-AzDataLakeGen2Item -FileSystem "filesystem1" -Path "dir1/file1" -F This command removes a directory from a Filesystem, without prompt. ### Example 3: Remove all items in a Filesystem with pipeline + ``` PS C:\>Get-AzDataLakeGen2ChildItem -FileSystem "filesystem1" | Remove-AzDataLakeGen2Item -Force ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md index 1b24079da616..42753d732921 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md @@ -36,6 +36,7 @@ The **Remove-AzRmStorageContainer** cmdlet removes a Storage blob container ## EXAMPLES ### Example 1: Remove a Storage blob container with Storage account name and container name + ``` PS C:\>Remove-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" ``` @@ -43,6 +44,7 @@ PS C:\>Remove-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -Account This command removes a Storage blob container with Storage account name and container name. ### Example 2: Remove a Storage blob container with Storage account object and container name + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>Remove-AzRmStorageContainer -StorageAccount $accountObject -ContainerName "myContainer" @@ -51,6 +53,7 @@ PS C:\>Remove-AzRmStorageContainer -StorageAccount $accountObject -ContainerName This command removes a Storage blob container with Storage account object and container name. ### Example 3: Remove all Storage blob containers in a Storage account with pipeline + ``` PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" | Remove-AzRmStorageContainer -Force ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md index 096ec0c9ce6a..7f4b70a977e2 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md @@ -43,6 +43,7 @@ The **Remove-AzRmStorageContainerImmutabilityPolicy** cmdlet removes Immutabilit ## EXAMPLES ### Example 1: Remove unlocked ImmutabilityPolicy of a Storage blob container with Storage account name and container name + ``` PS C:\>$policy = Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" PS C:\>Remove-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" -Etag $policy.Etag @@ -51,6 +52,7 @@ PS C:\>Remove-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResou This command removes unlocked ImmutabilityPolicy of a Storage blob container with Storage account name and container name. ### Example 2: Remove unlocked ImmutabilityPolicy of a Storage blob container, with Storage account object + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>$policy = Get-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObject -ContainerName "myContainer" @@ -60,6 +62,7 @@ PS C:\>Remove-AzRmStorageContainerImmutabilityPolicy -StorageAccount $accountObj This command removes unlocked ImmutabilityPolicy of a Storage blob container, with Storage account object. ### Example 3: Remove unlocked ImmutabilityPolicy of a Storage blob container, with container object + ``` PS C:\>$containerObject = Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -Name "myContainer" PS C:\>$policy = Get-AzRmStorageContainerImmutabilityPolicy -Container $containerObject @@ -69,6 +72,7 @@ PS C:\>Remove-AzRmStorageContainerImmutabilityPolicy -Container $containerObject This command removes unlocked ImmutabilityPolicy of a Storage blob container with Storage container object. ### Example 4: Remove unlocked ImmutabilityPolicy of a Storage blob container, with ImmutabilityPolicy object + ``` PS C:\>Get-AzRmStorageContainerImmutabilityPolicy -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" | Remove-AzRmStorageContainerImmutabilityPolicy ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md index 854c45e3faf4..02b907965354 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md @@ -37,6 +37,7 @@ The **Remove-AzRmStorageContainerLegalHold** cmdlet removes legal hold tags from ## EXAMPLES ### Example 1: Remove legal hold tags from a Storage blob container with Storage account name and container name + ``` PS C:\>Remove-AzRmStorageContainerLegalHold -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" -Tag tag1 ``` @@ -44,6 +45,7 @@ PS C:\>Remove-AzRmStorageContainerLegalHold -ResourceGroupName "myResourceGroup" This command removes legal hold tags from a Storage blob container with Storage account name and container name. ### Example 2: Remove legal hold tags from a Storage blob container with Storage account object and container name + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>Remove-AzRmStorageContainerLegalHold -StorageAccount $accountObject -ContainerName "myContainer" -Tag tag1,tag2 @@ -52,6 +54,7 @@ PS C:\>Remove-AzRmStorageContainerLegalHold -StorageAccount $accountObject -Cont This command removes legal hold tags from a Storage blob container with Storage account object and container name. ### Example 3: Remove legal hold tags from all Storage blob containers in a Storage account with pipeline + ``` PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" | Remove-AzRmStorageContainerLegalHold -Tag tag1 ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md b/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md index 56a746d6a998..cdc6ef737324 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md @@ -24,6 +24,7 @@ The **Remove-AzStorageAccount** cmdlet removes a Storage account from Azure. ## EXAMPLES ### Example 1: Remove a Storage account + ``` PS C:\>Remove-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md index 625801338fa3..e18de944efaa 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md @@ -42,6 +42,7 @@ The **Remove-AzStorageAccountManagementPolicy** cmdlet removes the management po ## EXAMPLES ### Example 1: Remove the management policy of a Storage account. + ``` PS C:\>Remove-AzStorageAccountManagementPolicy -ResourceGroupName "MyResourceGroup" -AccountName "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md b/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md index 1e5ee1a66c9e..972d96b39974 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md @@ -58,6 +58,7 @@ The **Remove-AzStorageAccountNetworkRule** cmdlet removes IpRules or VirtualNetw ## EXAMPLES ### Example 1: Remove several IpRules with IPAddressOrRange + ``` PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -IPAddressOrRange "10.0.0.0/7,28.1.0.0/16" ``` @@ -65,13 +66,15 @@ PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" - This command remove several IpRules with IPAddressOrRange. ### Example 2: Remove a VirtualNetworkRule with VirtualNetworkRule Object input with JSON + ``` -PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -VirtualNetworkRules (@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1";Action="allow"}) +PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -VirtualNetworkRule (@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1";Action="allow"}) ``` This command remove a VirtualNetworkRule with VirtualNetworkRule Object input with JSON. ### Example 3: Remove first IpRule with pipeline + ``` PS C:\>(Get-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount").IpRules[0] | Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "myStorageAccount" ``` @@ -79,6 +82,7 @@ PS C:\>(Get-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" This command remove first IpRule with pipeline. ### Example 4: Remove several VirtualNetworkRules with VirtualNetworkResourceID + ``` PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -VirtualNetworkResourceId "/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1","/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2" ``` @@ -86,6 +90,7 @@ PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" - This command remove several VirtualNetworkRules with VirtualNetworkResourceID. ### Example 5: Remove a resource access rule with TenantId and ResourceId. + ``` PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -TenantId $tenantId -ResourceId $ResourceId ``` @@ -93,6 +98,7 @@ PS C:\>Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" - This command removes a resource access rule with TenantId and ResourceId. ### Example 6: Remove the first 3 resource access rules from a storage account + ``` PS C:\> (Get-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount").ResourceAccessRules | Select-Object -First 3 | Remove-AzStorageAccountNetworkRule -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md b/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md index 036eefc94ece..177bf4995150 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md @@ -45,6 +45,7 @@ The **Remove-AzStorageBlob** cmdlet removes the specified blob from a storage ac ## EXAMPLES ### Example 1: Remove a storage blob by name + ``` PS C:\>Remove-AzStorageBlob -Container "ContainerName" -Blob "BlobName" ``` @@ -52,6 +53,7 @@ PS C:\>Remove-AzStorageBlob -Container "ContainerName" -Blob "BlobName" This command removes a blob identified by its name. ### Example 2: Remove a storage blob using the pipeline + ``` PS C:\>Get-AzStorageBlob -Container "ContainerName" -Blob "BlobName" | Remove-AzStorageBlob ``` @@ -59,6 +61,7 @@ PS C:\>Get-AzStorageBlob -Container "ContainerName" -Blob "BlobName" | Remove-Az This command uses the pipeline. ### Example 3: Remove storage blobs using the pipeline + ``` PS C:\>Get-AzStorageContainer -Container container* | Remove-AzStorageBlob -Blob "BlobName" ``` @@ -66,6 +69,7 @@ PS C:\>Get-AzStorageContainer -Container container* | Remove-AzStorageBlob -Blob This command uses the asterisk (*) wildcard character and the pipeline to retrieve the blob or blobs and then removes them. ### Example 4: Remove a single blob version + ``` PS C:\> Remove-AzStorageBlob -Container "containername" -Blob blob2 -VersionId "2020-07-03T16:19:16.2883167Z" ``` @@ -73,6 +77,7 @@ PS C:\> Remove-AzStorageBlob -Container "containername" -Blob blob2 -VersionId " This command removes a single blobs verion with VersionId. ### Example 5: Remove a single blob snapshot + ``` PS C:\> Remove-AzStorageBlob -Container "containername" -Blob blob1 -SnapshotTime "2020-07-06T06:56:06.8588431Z" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md index 8d0e120af279..91eb809c2992 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md @@ -42,6 +42,7 @@ The **Remove-AzStorageBlobInventoryPolicy** cmdlet removes blob inventory policy ## EXAMPLES ### Example 1: Remove blob inventory policy from a Storage account + ``` PS C:\>Remove-AzStorageBlobInventoryPolicy -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md b/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md index 9288fd374df2..11c4d794e8de 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md @@ -27,6 +27,7 @@ The types of storage services for this cmdlet are Blob, Table, Queue, and File. ## EXAMPLES ### Example 1: Remove CORS rules for the blob service + ``` PS C:\>Remove-AzStorageCORSRule -ServiceType Blob ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md b/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md index cffe77a50210..bfdf78bad16b 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md @@ -26,6 +26,7 @@ The **Remove-AzStorageContainer** cmdlet removes the specified storage container ## EXAMPLES ### Example 1: Remove a container + ``` PS C:\>Remove-AzStorageContainer -Name "MyTestContainer" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md index c7d331c13088..6dfdebeb29f3 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md @@ -26,6 +26,7 @@ The **Remove-AzStorageContainerStoredAccessPolicy** cmdlet removes a stored acce ## EXAMPLES ### Example 1: Remove a stored access policy from a storage container + ``` PS C:\>Remove-AzStorageContainerStoredAccessPolicy -Container "MyContainer" -Policy "Policy03" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageFile.md b/src/Storage/Storage.Management/help/Remove-AzStorageFile.md index a6811be779e6..f427516a2cdf 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageFile.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageFile.md @@ -49,6 +49,7 @@ The **Remove-AzStorageFile** cmdlet deletes a file. ## EXAMPLES ### Example 1: Delete a file from a file share + ``` PS C:\>Remove-AzStorageFile -ShareName "ContosoShare06" -Path "ContosoFile22" ``` @@ -56,6 +57,7 @@ PS C:\>Remove-AzStorageFile -ShareName "ContosoShare06" -Path "ContosoFile22" This command deletes the file that is named ContosoFile22 from the file share named ContosoShare06. ### Example 2: Get a file from a file share by using a file share object + ``` PS C:\>Get-AzStorageShare -Name "ContosoShare06" | Remove-AzStorageFile -Path "ContosoFile22" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md b/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md index 44e31b46f1e1..32ab40b882c3 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md @@ -24,6 +24,7 @@ The **Remove-AzStorageQueue** cmdlet removes a storage queue. ## EXAMPLES ### Example 1: Remove a storage queue by name + ``` PS C:\>Remove-AzStorageQueue "ContosoQueue01" ``` @@ -31,6 +32,7 @@ PS C:\>Remove-AzStorageQueue "ContosoQueue01" This command removes a queue named ContosoQueue01. ### Example 2: Remove multiple storage queues + ``` PS C:\>Get-AzStorageQueue "Contoso*" | Remove-AzStorageQueue ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md index 346d48e5a347..55b906c410f7 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **Remove-AzStorageQueueStoredAccessPolicy** cmdlet removes a stored access p ## EXAMPLES ### Example 1: Remove a stored access policy from a storage queue + ``` PS C:\>Remove-AzStorageQueueStoredAccessPolicy -Queue "MyQueue" -Policy "Policy04" ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageShare.md b/src/Storage/Storage.Management/help/Remove-AzStorageShare.md index 69fb0a669341..74bccf696dec 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageShare.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageShare.md @@ -35,6 +35,7 @@ The **Remove-AzStorageShare** cmdlet deletes a file share. ## EXAMPLES ### Example 1: Remove a file share + ``` PS C:\>Remove-AzStorageShare -Name "ContosoShare06" ``` @@ -42,6 +43,7 @@ PS C:\>Remove-AzStorageShare -Name "ContosoShare06" This command removes the file share named ContosoShare06. ### Example 2: Remove a file share and all its snapshots + ``` PS C:\>Remove-AzStorageShare -Name "ContosoShare06" -IncludeAllSnapshot ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageTable.md b/src/Storage/Storage.Management/help/Remove-AzStorageTable.md index 7a71d92d62d3..68eca19a975e 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageTable.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageTable.md @@ -24,6 +24,7 @@ The **Remove-AzStorageTable** cmdlet removes one or more storage tables from a s ## EXAMPLES ### Example 1: Remove a table + ``` PS C:\>Remove-AzStorageTable -Name "TableABC" ``` @@ -31,6 +32,7 @@ PS C:\>Remove-AzStorageTable -Name "TableABC" This command removes a table. ### Example 2: Remove several tables + ``` PS C:\>Get-AzStorageTable table* | Remove-AzStorageTable ``` diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md index 67d91a2a7124..8f9803659786 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **Remove-AzStorageTableStoredAccessPolicy** cmdlet removes a stored access p ## EXAMPLES ### Example 1: Remove a stored access policy from a storage table + ``` PS C:\>Remove-AzStorageTableStoredAccessPolicy -Table "MyTable" -Policy "Policy05" ``` diff --git a/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md b/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md index 124a70361516..792d2b96be8c 100644 --- a/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md +++ b/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md @@ -36,6 +36,7 @@ The **Revoke-AzStorageAccountUserDelegationKeys** cmdlet revokes all User Delega ## EXAMPLES ### Example 1: Revoke all User Delegation keys of a Storage account + ```powershell PS C:\>Revoke-AzStorageAccountUserDelegationKeys -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md b/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md index 28912dbf0e38..dcf80f5e2321 100644 --- a/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md +++ b/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md @@ -32,6 +32,7 @@ The current Storage account is used as the default when you access Storage witho ## EXAMPLES ### Example 1: Set the current Storage account + ``` PS C:\>Set-AzCurrentStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount" ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md index be6df1aeeb62..eccc50c9fe53 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md @@ -350,6 +350,7 @@ Rules : [ This command creates or updates the management policy of a Storage account with a json format policy. ### Example 3: Get the management policy from a Storage account, then set it to another Storage account. + ``` PS C:\>$outputPolicy = Get-AzStorageAccountManagementPolicy -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" | Set-AzStorageAccountManagementPolicy -ResourceGroupName "myresourcegroup2" -AccountName "mystorageaccount2" ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md b/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md index cd4199aa9f31..2c058d5d0f70 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md @@ -49,6 +49,7 @@ The **Set-AzStorageBlobContent** cmdlet uploads a local file to an Azure Storage ## EXAMPLES ### Example 1: Upload a named file + ``` Set-AzStorageBlobContent -Container "ContosoUpload" -File ".\PlanningData" -Blob "Planning2015" ``` @@ -56,6 +57,7 @@ Set-AzStorageBlobContent -Container "ContosoUpload" -File ".\PlanningData" -Blob This command uploads the file that is named PlanningData to a blob named Planning2015. ### Example 2: Upload all files under the current folder + ``` Get-ChildItem -File -Recurse | Set-AzStorageBlobContent -Container "ContosoUploads" ``` @@ -64,6 +66,7 @@ This command uses the core Windows PowerShell cmdlet Get-ChildItem to get all th The **Set-AzStorageBlobContent** cmdlet uploads the files to the container named ContosoUploads. ### Example 3: Overwrite an existing blob + ``` Get-AzStorageBlob -Container "ContosoUploads" -Blob "Planning2015" | Set-AzStorageBlobContent -File "ContosoPlanning" ``` @@ -75,6 +78,7 @@ The command prompts you for confirmation. If you confirm the command, the cmdlet overwrites the existing blob. ### Example 4: Upload a file to a container by using the pipeline + ``` Get-AzStorageContainer -Container "ContosoUpload*" | Set-AzStorageBlobContent -File "ContosoPlanning" -Blob "Planning2015" ``` @@ -83,6 +87,7 @@ This command gets the container that starts with the string ContosoUpload by usi The command uploads the file that is named ContosoPlanning as Planning2015. ### Example 5: Upload a file to page blob with metadata and PremiumPageBlobTier as P10 + ``` $Metadata = @{"key" = "value"; "name" = "test"} Set-AzStorageBlobContent -File "ContosoPlanning" -Container "ContosoUploads" -Metadata $Metadata -BlobType Page -PremiumPageBlobTier P10 diff --git a/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md b/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md index 8e21562cfe12..5760a7c2780b 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md @@ -28,6 +28,7 @@ To see the current rules, use the Get-AzStorageCORSRule cmdlet. ## EXAMPLES ### Example 1: Assign CORS rules to the blob service + ``` PS C:\>$CorsRules = (@{ AllowedHeaders=@("x-ms-blob-content-type","x-ms-blob-content-disposition"); @@ -48,6 +49,7 @@ This command uses standard extends over several lines in this code block. The second command assigns the rules in $CorsRules to the Blob service type. ### Example 2: Change properties of a CORS rule for blob service + ``` PS C:\>$CorsRules = Get-AzStorageCORSRule -ServiceType Blob PS C:\> $CorsRules[0].AllowedHeaders = @("x-ms-blob-content-type", "x-ms-blob-content-disposition") diff --git a/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md b/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md index 06762c744290..6c67e71f6c41 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md @@ -25,6 +25,7 @@ The **Set-AzStorageContainerAcl** cmdlet sets the public access permission to th ## EXAMPLES ### Example 1: Set azure storage container ACL by name + ``` PS C:\>Set-AzStorageContainerAcl -Container "Container01" -Permission Off -PassThru ``` @@ -32,6 +33,7 @@ PS C:\>Set-AzStorageContainerAcl -Container "Container01" -Permission Off -PassT This command creates a container that has no public access. ### Example 2: Set azure storage container ACL by using the pipeline + ``` PS C:\>Get-AzStorageContainer container* | Set-AzStorageContainerAcl -Permission Blob -PassThru ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md index 64f91ad97318..61b265320f8d 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md @@ -27,6 +27,7 @@ The **Set-AzStorageContainerStoredAccessPolicy** cmdlet sets a stored access pol ## EXAMPLES ### Example 1: Set a stored access policy in a storage container with full permission + ``` PS C:\>Set-AzStorageContainerStoredAccessPolicy -Container "MyContainer" -Policy "Policy06" -Permission rwdl ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md b/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md index 3f452733f09d..73a7699df86a 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md @@ -43,6 +43,7 @@ The **Set-AzStorageFileContent** cmdlet uploads the contents of a file to a file ## EXAMPLES ### Example 1: Upload a file in the current folder + ``` PS C:\>Set-AzStorageFileContent -ShareName "ContosoShare06" -Source "DataFile37" -Path "ContosoWorkingFolder/CurrentDataFile" ``` @@ -50,6 +51,7 @@ PS C:\>Set-AzStorageFileContent -ShareName "ContosoShare06" -Source "DataFile37" This command uploads a file that is named DataFile37 in the current folder as a file that is named CurrentDataFile in the folder named ContosoWorkingFolder. ### Example 2: Upload all the files in the current folder + ``` PS C:\>$CurrentFolder = (Get-Item .).FullName PS C:\> $Container = Get-AzStorageShare -Name "ContosoShare06" diff --git a/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md index d7dd5f7b04a4..de3a26de4815 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **Set-AzStorageQueueStoredAccessPolicy** cmdlet sets a stored access policy ## EXAMPLES ### Example 1: Set a stored access policy in the queue with full permission + ``` PS C:\> Set-AzStorageQueueStoredAccessPolicy -Queue "MyQueue" -Policy "Policy07" -Permission arup ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md b/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md index 46e37ff25bb7..1d672f80ae5f 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md @@ -25,6 +25,7 @@ The **Set-AzStorageServiceLoggingProperty** cmdlet modifies logging for Azure St ## EXAMPLES ### Example 1: Modify logging properties for the Blob service + ``` C:\PS>Set-AzStorageServiceLoggingProperty -ServiceType Blob -LoggingOperations Read,Write -PassThru -RetentionDays 10 -Version 1.0 ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md b/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md index 329884b3e48d..fcec5bcfe15c 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md @@ -25,6 +25,7 @@ The **Set-AzStorageServiceMetricsProperty** cmdlet modifies metrics properties f ## EXAMPLES ### Example 1: Modify metrics properties for the Blob service + ``` C:\PS>Set-AzStorageServiceMetricsProperty -ServiceType Blob -MetricsType Hour -MetricsLevel Service -PassThru -RetentionDays 10 -Version 1.0 ``` diff --git a/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md index b95dc72ea686..591d49dce79c 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md @@ -25,6 +25,7 @@ The **Set-AzStorageTableStoredAccessPolicy** cmdlet set the stored access policy ## EXAMPLES ### Example 1: Set a stored access policy in table with full permission + ``` PS C:\>Set-AzStorageTableStoredAccessPolicy -Table "MyTable" -Policy "Policy08" -Permission raud ``` diff --git a/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md b/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md index 8337822f7f5f..e9884fb7dd07 100644 --- a/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md +++ b/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md @@ -61,6 +61,7 @@ See more details of the feature in https://docs.microsoft.com/rest/api/storagese ## EXAMPLES ### Example 1: Start Incremental Copy Operation by blob name and snapshot time + ``` PS C:\>Start-AzStorageBlobIncrementalCopy -SrcContainer container1 -SrcBlob blob1 -SrcBlobSnapshotTime "04/07/2017 09:55:36.1190229 AM +00:00" -DestContainer container2 -DestBlob blob2 ``` @@ -68,6 +69,7 @@ PS C:\>Start-AzStorageBlobIncrementalCopy -SrcContainer container1 -SrcBlob blob This command start Incremental Copy Operation by blob name and snapshot time ### Example 2: Start Incremental copy operation using source uri + ``` PS C:\>Start-AzStorageBlobIncrementalCopy -AbsoluteUri "http://www.somesite.com/somefile?snapshot=2017-04-07T10:05:40.2126635Z" -DestContainer container -DestBlob blob -DestContext $context ``` @@ -75,6 +77,7 @@ PS C:\>Start-AzStorageBlobIncrementalCopy -AbsoluteUri "http://www.somesite.com/ This command start Incremental Copy Operation using source uri ### Example 3: Start Incremental copy operation using container pipeline from GetAzureStorageContainer + ``` PS C:\>Get-AzStorageContainer -Container container1 | Start-AzStorageBlobIncrementalCopy -SrcBlob blob -SrcBlobSnapshotTime "04/07/2017 09:55:36.1190229 AM +00:00" -DestContainer container2 ``` @@ -82,6 +85,7 @@ PS C:\>Get-AzStorageContainer -Container container1 | Start-AzStorageBlobIncreme This command start Incremental Copy Operation using container pipeline from GetAzureStorageContainer ### Example 4: start Incremental copy operation from CloudPageBlob object to destination blob with blob name + ``` PS C:\>$srcBlobSnapshot = Get-AzStorageBlob -Container container1 -prefix blob1| Where-Object ({$_.ICloudBlob.IsSnapshot})[0] PS C:\>Start-AzStorageBlobIncrementalCopy -CloudBlob $srcBlobSnapshot.ICloudBlob -DestContainer container2 -DestBlob blob2 diff --git a/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md b/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md index 5f32d12aad60..399b3fa8694b 100644 --- a/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md +++ b/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md @@ -43,6 +43,7 @@ The **Stop-AzStorageBlobCopy** cmdlet stops a copy operation to the specified de ## EXAMPLES ### Example 1: Stop copy operation by name + ``` PS C:\>Stop-AzStorageBlobCopy -Container "ContainerName" -Blob "BlobName" -CopyId "CopyID" ``` @@ -50,6 +51,7 @@ PS C:\>Stop-AzStorageBlobCopy -Container "ContainerName" -Blob "BlobName" -CopyI This command stops the copy operation by name. ### Example 2: Stop copy operation by using the pipeline + ``` PS C:\>Get-AzStorageContainer container* | Stop-AzStorageBlobCopy -Blob "BlobName" ``` @@ -57,6 +59,7 @@ PS C:\>Get-AzStorageContainer container* | Stop-AzStorageBlobCopy -Blob "BlobNam This command stops the copy operation by passing the container on the pipeline from **Get-AzStorageContainer**. ### Example 3: Stop copy operation by using the pipeline and Get-AzStorageBlob + ``` PS C:\>Get-AzStorageBlob -Container "ContainerName" | Stop-AzStorageBlobCopy -Force ``` diff --git a/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md index af484768e869..0af5d7c2d1c6 100644 --- a/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md @@ -38,6 +38,7 @@ The **Update-AzRmStorageContainer** cmdlet modifies a Storage blob container ## EXAMPLES ### Example 1: Modifies a Storage blob container's metadata and public access with Storage account name and container name + ``` PS C:\>Update-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" -ContainerName "myContainer" -PublicAccess Container -Metadata @{tag0="value0";tag1="value1"} ``` @@ -45,6 +46,7 @@ PS C:\>Update-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -Account This command modifies a Storage blob container's metadata and public access with Storage account name and container name. ### Example 2: Disable public access on a Storage blob container with Storage account object and container name + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" PS C:\>Update-AzRmStorageContainer -StorageAccount $accountObject -ContainerName "myContainer" -PublicAccess None @@ -53,6 +55,7 @@ PS C:\>Update-AzRmStorageContainer -StorageAccount $accountObject -ContainerName This command disables public access on a Storage blob container with Storage account object and container name. ### Example 3: Set public access as Blob for all Storage blob containers in a Storage account with pipeline + ``` PS C:\>Get-AzRmStorageContainer -ResourceGroupName "myResourceGroup" -AccountName "myStorageAccount" | Update-AzRmStorageContainer -PublicAccess Blob ``` diff --git a/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md index 8e5b99a23957..58294c6ca3a5 100644 --- a/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md @@ -69,6 +69,7 @@ tag1 value1 This command modifies a Storage file share's metadata and share quota with Storage account name and share name, and show the modify result with the returned file share object. ### Example 2: Modifies metadata on a Storage file share with Storage account object and share name + ``` PS C:\>$accountObject = Get-AzStorageAccount -ResourceGroupName "myResourceGroup" -StorageAccountName "myStorageAccount" PS C:\>$share = Update-AzRmStorageShare -StorageAccount $accountObject -Name "myshare" -Metadata @{tag0="value0";tag1="value1"} diff --git a/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md b/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md index b2c4ff79f64f..e143bab1c518 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md @@ -25,15 +25,17 @@ The **Update-AzStorageAccountNetworkRuleSet** cmdlet updates the NetworkRule pro ## EXAMPLES ### Example 1: Update all properties of NetworkRule, input Rules with JSON + ``` -PS C:\> Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -Bypass Logging,Metrics -DefaultAction Allow -IpRule (@{IPAddressOrRange="10.0.0.0/7";Action="allow"},@{IPAddressOrRange="28.2.0.0/16";Action="allow"}) - -VirtualNetworkRule (@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1";Action="allow"},@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualN - etworks/vnet2/subnets/subnet2";Action="allow"}) -ResourceAccessRule (@{ResourceId=$ResourceId1;TenantId=$tenantId1},@{ResourceId=$ResourceId2;TenantId=$tenantId1}) +PS C:\> Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -Bypass Logging,Metrics -DefaultAction Allow -IpRule (@{IPAddressOrRange="10.0.0.0/7";Action="allow"},@{IPAddressOrRange="28.2.0.0/16";Action="allow"}) ` +-VirtualNetworkRule (@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1";Action="allow"}, +@{VirtualNetworkResourceId="/subscriptions/s1/resourceGroups/g1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2";Action="allow"}) -ResourceAccessRule (@{ResourceId=$ResourceId1;TenantId=$tenantId1},@{ResourceId=$ResourceId2;TenantId=$tenantId1}) ``` This command update all properties of NetworkRule, input Rules with JSON. ### Example 2: Update Bypass property of NetworkRule + ``` PS C:\> Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -Bypass AzureServices,Metrics ``` @@ -41,6 +43,7 @@ PS C:\> Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGrou This command update Bypass property of NetworkRule (other properties won't change). ### Example 3: Clean up rules of NetworkRule of a Storage account + ``` PS C:\> Update-AzStorageAccountNetworkRuleSet -ResourceGroupName "myResourceGroup" -Name "mystorageaccount" -IpRule @() -VirtualNetworkRule @() -ResourceAccessRule @() ``` diff --git a/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md b/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md index ea161d920cf9..c77c88860484 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md @@ -24,6 +24,7 @@ The **Update-AzStorageServiceProperty** cmdlet modifies the properties for the A ## EXAMPLES ### Example 1: Set Blob Service DefaultServiceVersion to 2017-04-17 + ``` C:\PS>Update-AzStorageServiceProperty -ServiceType Blob -DefaultServiceVersion 2017-04-17 ```