diff --git a/src/Accounts/Accounts/help/Clear-AzContext.md b/src/Accounts/Accounts/help/Clear-AzContext.md index 920dffaf48e8..7f835a7bc168 100644 --- a/src/Accounts/Accounts/help/Clear-AzContext.md +++ b/src/Accounts/Accounts/help/Clear-AzContext.md @@ -22,8 +22,8 @@ Remove all Azure Credentials, account, and subscription information. ## EXAMPLES -### Clear global context -``` +### Example 1: Clear global context +```powershell PS C:\> Clear-AzContext -Scope CurrentUser ``` diff --git a/src/Accounts/Accounts/help/Clear-AzDefault.md b/src/Accounts/Accounts/help/Clear-AzDefault.md index 6136d0ee426c..a390fd8b9cf1 100644 --- a/src/Accounts/Accounts/help/Clear-AzDefault.md +++ b/src/Accounts/Accounts/help/Clear-AzDefault.md @@ -24,14 +24,14 @@ the user depending on the switch parameters specified by the user. ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> Clear-AzDefault ``` This command removes all the defaults set by the user in the current context. -### Example 1 -``` +### Example 2 +```powershell PS C:\> Clear-AzDefault -ResourceGroup ``` diff --git a/src/Accounts/Accounts/help/Disable-AzContextAutosave.md b/src/Accounts/Accounts/help/Disable-AzContextAutosave.md index fe5532578f41..851175102a00 100644 --- a/src/Accounts/Accounts/help/Disable-AzContextAutosave.md +++ b/src/Accounts/Accounts/help/Disable-AzContextAutosave.md @@ -22,13 +22,21 @@ Turn off autosaving Azure credentials. Your login information will be forgotten ## EXAMPLES -### Disable autosaving the context -``` +### Example 1: Disable autosaving the context +```powershell PS C:\> Disable-AzContextAutosave ``` Disable autosave for the current user. +### Example 2 + +Turn off autosaving Azure credentials in this powershell session. (autogenerated) + +```powershell +Disable-AzContextAutosave -Scope Process +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Accounts/Accounts/help/Disconnect-AzAccount.md b/src/Accounts/Accounts/help/Disconnect-AzAccount.md index 74b2df0b4d45..0a893a7f5412 100644 --- a/src/Accounts/Accounts/help/Disconnect-AzAccount.md +++ b/src/Accounts/Accounts/help/Disconnect-AzAccount.md @@ -48,22 +48,22 @@ After executing this cmdlet, you will need to login again using Connect-AzAccoun ## EXAMPLES -### Logout of the current account -``` +### Example 1: Logout of the current account +```powershell PS C:\> Disconnect-AzAccount ``` Logs out of the Azure account associated with the current context. -### Logout of the account associated with a particular context -``` +### Example 2: Logout of the account associated with a particular context +```powershell PS C:\> Get-AzContext "Work" | Disconnect-AzAccount -Scope CurrentUser ``` Logs out the account associated with the given context (named 'Work'). Because this uses the 'CurrentUser' scope, all credentials and contexts will be permanently deleted. -### Log out a particular user -``` +### Example 3: Log out a particular user +```powershell PS C:\> Disconnect-AzAccount -Username 'user1@contoso.org' ``` diff --git a/src/Accounts/Accounts/help/Enable-AzContextAutosave.md b/src/Accounts/Accounts/help/Enable-AzContextAutosave.md index ce16259f2a7f..9bfb635d669a 100644 --- a/src/Accounts/Accounts/help/Enable-AzContextAutosave.md +++ b/src/Accounts/Accounts/help/Enable-AzContextAutosave.md @@ -22,13 +22,21 @@ Allow the azure credential, account and subscription information to be saved and ## EXAMPLES -### Enable autosaving credentials for the current user -``` +### Example 1: Enable autosaving credentials for the current user +```powershell PS C:\> Enable-AzContextAutosave ``` Turn on credential autosave for the current user. Whenever a powershell window is opened, your current context will be remembered without logging in. +### Example 2 + +Allow the azure credential, account and subscription information to be saved and automatically loaded when you open a PowerShell window in this powershell session. (autogenerated) + +```powershell +Enable-AzContextAutosave -Scope Process +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Accounts/Accounts/help/Enable-AzureRmAlias.md b/src/Accounts/Accounts/help/Enable-AzureRmAlias.md index f5a979b11667..2f625d7cd4c8 100644 --- a/src/Accounts/Accounts/help/Enable-AzureRmAlias.md +++ b/src/Accounts/Accounts/help/Enable-AzureRmAlias.md @@ -23,14 +23,14 @@ Enables AzureRm prefix aliases for Az modules. If -Module is specified, only mod ## EXAMPLES ### Example 1 -``` +```powershell PS C:\> Enable-AzureRmAlias ``` Enables all AzureRm prefixes for the current PowerShell session. -### Example 1 -``` +### Example 2 +```powershell PS C:\> Enable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser ``` diff --git a/src/Accounts/Accounts/help/Rename-AzContext.md b/src/Accounts/Accounts/help/Rename-AzContext.md index c8b609740964..33474187d338 100644 --- a/src/Accounts/Accounts/help/Rename-AzContext.md +++ b/src/Accounts/Accounts/help/Rename-AzContext.md @@ -30,16 +30,16 @@ Rename an Azure context. By default contexts are named by user account and subs ## EXAMPLES -### Rename a context using named parameters -``` +### Example 1: Rename a context using named parameters +```powershell PS C:\> Rename-AzContext -SourceName "[user1@contoso.org; 12345-6789-2345-3567890]" -TargetName "Work" ``` Rename the context for 'user1@contoso.org' with subscription '12345-6789-2345-3567890' to 'Work'. After this command, you will be able to target the context using 'Select-AzContext Work'. Note that you can tab through the values for 'SourceName' using tab completion. -### Rename a context using positional parameters -``` +### Example 2: Rename a context using positional parameters +```powershell PS C:\> Rename-AzContext "My context" "Work" ``` diff --git a/src/Accounts/Accounts/help/Select-AzContext.md b/src/Accounts/Accounts/help/Select-AzContext.md index 085e3836ea00..608e67e3e18c 100644 --- a/src/Accounts/Accounts/help/Select-AzContext.md +++ b/src/Accounts/Accounts/help/Select-AzContext.md @@ -30,8 +30,8 @@ selected context. ## EXAMPLES -### Example 1 : Target a named context -``` +### Example 1: Target a named context +```powershell PS C:\> Select-AzContext "Work" Name Account SubscriptionName Environment TenantId @@ -41,6 +41,14 @@ Work test@outlook.com Subscription1 AzureCloud xxxxxxxx-x.. Target future Azure PowerShell cmdlets at the account, tenant, and subscription in the 'Work' context. +### Example 2 + +Select a subscription and account to target in Azure PowerShell cmdlets in this powershell session. (autogenerated) + +```powershell +Select-AzContext -Name TestEnvironment -Scope Process +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/KeyVault/KeyVault/help/New-AzKeyVaultCertificatePolicy.md b/src/KeyVault/KeyVault/help/New-AzKeyVaultCertificatePolicy.md index 20bbe557a797..b4a6dab0d1b2 100644 --- a/src/KeyVault/KeyVault/help/New-AzKeyVaultCertificatePolicy.md +++ b/src/KeyVault/KeyVault/help/New-AzKeyVaultCertificatePolicy.md @@ -71,6 +71,14 @@ Updated : This command creates a certificate policy that is valid for six months and reuses the key to renew the certificate. +### Example 2 + +Creates an in-memory certificate policy object. (autogenerated) + +```powershell +New-AzKeyVaultCertificatePolicy -IssuerName 'Self' -KeyType RSA -RenewAtNumberOfDaysBeforeExpiry -SecretContentType application/x-pkcs12 -SubjectName 'CN=contoso.com' -ValidityInMonths 6 +``` + ## PARAMETERS ### -CertificateTransparency diff --git a/src/KeyVault/KeyVault/help/Set-AzKeyVaultManagedStorageSasDefinition.md b/src/KeyVault/KeyVault/help/Set-AzKeyVaultManagedStorageSasDefinition.md index 1b38ba5fdbd9..5842b36b093f 100644 --- a/src/KeyVault/KeyVault/help/Set-AzKeyVaultManagedStorageSasDefinition.md +++ b/src/KeyVault/KeyVault/help/Set-AzKeyVaultManagedStorageSasDefinition.md @@ -35,7 +35,7 @@ Storage Account. ## EXAMPLES -### Example 1 : Set an account-type SAS definition, and obtain a current SAS token based on it +### Example 1: Set an account-type SAS definition, and obtain a current SAS token based on it ```powershell PS C:\> $sa = Get-AzStorageAccount -Name mysa -ResourceGroupName myrg PS C:\> $kv = Get-AzKeyVault -VaultName mykv diff --git a/src/KeyVault/KeyVault/help/Update-AzKeyVaultCertificate.md b/src/KeyVault/KeyVault/help/Update-AzKeyVaultCertificate.md index bf3fd028bf90..7afffcb1dd5a 100644 --- a/src/KeyVault/KeyVault/help/Update-AzKeyVaultCertificate.md +++ b/src/KeyVault/KeyVault/help/Update-AzKeyVaultCertificate.md @@ -68,6 +68,14 @@ Updated : 8/1/2016 5:37:48 PM The first command assigns an array of key/value pairs to the $Tags variable. The second command sets the tags value of the certificate named TestCert01 to be $Tags. +### Example 2 + +Modifies editable attributes of a certificate. (autogenerated) + +```powershell +Update-AzKeyVaultCertificate -Enable $true -Name 'TestCert01' -VaultName 'ContosoKV01' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/KeyVault/KeyVault/help/Update-AzKeyVaultManagedStorageAccount.md b/src/KeyVault/KeyVault/help/Update-AzKeyVaultManagedStorageAccount.md index 46a4c4353f66..6b2c4a8fec35 100644 --- a/src/KeyVault/KeyVault/help/Update-AzKeyVaultManagedStorageAccount.md +++ b/src/KeyVault/KeyVault/help/Update-AzKeyVaultManagedStorageAccount.md @@ -53,6 +53,14 @@ Tags : Updates the Key Vault managed Azure Storage Account active key to 'key2'. 'key2' will be used to generate SAS tokens after this update. +### Example 2 + +Update editable attributes of a Key Vault managed Azure Storage Account. (autogenerated) + +```powershell +Update-AzKeyVaultManagedStorageAccount -AccountName 'mystorageaccount' -AutoRegenerateKey $false -RegenerationPeriod $regenerationPeriod -VaultName 'myvault' +``` + ## PARAMETERS ### -AccountName diff --git a/src/KeyVault/KeyVault/help/Update-AzKeyVaultNetworkRuleSet.md b/src/KeyVault/KeyVault/help/Update-AzKeyVaultNetworkRuleSet.md index 1c6faa27aa98..0968eb4e9a66 100644 --- a/src/KeyVault/KeyVault/help/Update-AzKeyVaultNetworkRuleSet.md +++ b/src/KeyVault/KeyVault/help/Update-AzKeyVaultNetworkRuleSet.md @@ -89,6 +89,14 @@ Tags : This command updates the network ruleset on the vault named 'myVault' for the specified IP range and the virtual network, allowing bypassing of the network rule for Azure services. +### Example 2 + +Updates the network rule set on a key vault. (autogenerated) + +```powershell +Update-AzKeyVaultNetworkRuleSet -DefaultAction Allow -VaultName 'myVault' +``` + ## PARAMETERS ### -Bypass diff --git a/src/Monitor/Monitor/help/Add-AzLogProfile.md b/src/Monitor/Monitor/help/Add-AzLogProfile.md index b8c8e6308edb..e29e989cf3d3 100644 --- a/src/Monitor/Monitor/help/Add-AzLogProfile.md +++ b/src/Monitor/Monitor/help/Add-AzLogProfile.md @@ -30,11 +30,19 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma ## EXAMPLES -### Example 1 : Add a new log profile to export the activity log matching the location condition to a storage account -``` +### Example 1: Add a new log profile to export the activity log matching the location condition to a storage account +```powershell Add-AzLogProfile -Location "Global","West US" -Name ExportLogProfile -StorageAccountId /subscriptions/40gpe80s-9sb7-4f07-9042-b1b6a92ja9fk/resourceGroups/activitylogRG/providers/Microsoft.Storage/storageAccounts/activitylogstorageaccount ``` +### Example 2 + +Creates a new activity log profile. (autogenerated) + +```powershell +Add-AzLogProfile -Location 'Global' -Name ExportLogProfile -RetentionInDays -ServiceBusRuleId -StorageAccountId /subscriptions/40gpe80s-9sb7-4f07-9042-b1b6a92ja9fk/resourceGroups/activitylogRG/providers/Microsoft.Storage/storageAccounts/activitylogstorageaccount +``` + ## PARAMETERS ### -Category diff --git a/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md index 2572191eb5a8..e77cd598c55b 100644 --- a/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Get-AzScheduledQueryRule.md @@ -34,7 +34,7 @@ Gets Scheduled Query Resources ## EXAMPLES -### Example 1 - List by subscription or resource group +### Example 1: List by subscription or resource group ```powershell PS C:\> Get-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" @@ -65,7 +65,7 @@ Location : centralindia Tags : {[hidden-link:/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]} ``` -### Example 2 - Get by rule name +### Example 2: Get by rule name ```powershell PS C:\> Get-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" @@ -83,7 +83,7 @@ Location : centralindia Tags : {[hidden-link:/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]} ``` -### Example 3 - Get by resource Id +### Example 3: Get by resource Id ```powershell PS C:\> Get-AzScheduledQueryRule -ResourceId "/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1" diff --git a/src/Monitor/Monitor/help/New-AzAutoscaleRule.md b/src/Monitor/Monitor/help/New-AzAutoscaleRule.md index cddd43f0fe21..c1cbc8f9ef55 100644 --- a/src/Monitor/Monitor/help/New-AzAutoscaleRule.md +++ b/src/Monitor/Monitor/help/New-AzAutoscaleRule.md @@ -27,7 +27,7 @@ The **New-AzAutoscaleRule** cmdlet creates an Autoscale rule. ## EXAMPLES ### Example 1: Create a rule -``` +```powershell PS C:\>$Rule = New-AzAutoscaleRule -MetricName "Requests" -MetricResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite" -Operator GreaterThan -MetricStatistic Average -Threshold 10 -TimeGrain 00:01:00 -ScaleActionCooldown 00:05:00 -ScaleActionDirection Increase -ScaleActionScaleType ChangeCount -ScaleActionValue "1" MetricTrigger ScaleAction ------------- ----------- @@ -37,7 +37,7 @@ Microsoft.Azure.Management.Insights.Models.MetricTrigger Microsoft.Azure.Mana This command creates a rule. ### Example 2: Create two rules -``` +```powershell PS C:\>$Rule1 = New-AzAutoscaleRule -MetricName "Requests" -MetricResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite" -Operator GreaterThan -MetricStatistic Average -Threshold 10 -TimeGrain 00:01:00 -ScaleActionCooldown 00:05:00 -ScaleActionDirection Increase -ScaleActionScaleType ChangeCount -ScaleActionValue "1" PS C:\> $Rule2 = New-AzAutoscaleRule -MetricName "Requests" -MetricResourceId "/subscriptions/b93fb07a-6f93-30be-bf3e-4f0deca15f4f/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite" -Operator GreaterThan -MetricStatistic Average -Threshold 10 -TimeGrain 00:01:00 -ScaleActionCooldown 00:10:00 -ScaleActionDirection Increase -ScaleActionScaleType ChangeCount -ScaleActionValue "2" @@ -50,6 +50,14 @@ Microsoft.Azure.Management.Insights.Models.MetricTrigger Microsoft.Azure.Mana The first command creates a rule for the Requests metric, and then stores it in the $Rule1 variable. The second command creates a second rule for the Requests metric, and then stores it in the $Rule2 variable. +### Example 3 + +Creates an Autoscale rule. (autogenerated) + +```powershell +New-AzAutoscaleRule -MetricName 'Requests' -MetricResourceId '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/mywebsite' -MetricStatistic Average -Operator Equals -ScaleActionCooldown 00:05:00 -ScaleActionDirection None -ScaleActionScaleType ChangeCount -ScaleActionValue '1' -Threshold 10 -TimeGrain 00:01:00 -TimeWindow +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Monitor/Monitor/help/New-AzAutoscaleWebhook.md b/src/Monitor/Monitor/help/New-AzAutoscaleWebhook.md index add1a322bb9b..13faed1bad10 100644 --- a/src/Monitor/Monitor/help/New-AzAutoscaleWebhook.md +++ b/src/Monitor/Monitor/help/New-AzAutoscaleWebhook.md @@ -23,6 +23,14 @@ The **New-AzAutoscaleWebhook** cmdlet creates an Autoscale webhook. ## EXAMPLES +### Example 1 + +Creates an Autoscale webhook. (autogenerated) + +```powershell +New-AzAutoscaleWebhook -ServiceUri 'https://contoso.com' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Monitor/Monitor/help/New-AzMetricAlertRuleV2DimensionSelection.md b/src/Monitor/Monitor/help/New-AzMetricAlertRuleV2DimensionSelection.md index 95935227363e..6c0dc35fe611 100644 --- a/src/Monitor/Monitor/help/New-AzMetricAlertRuleV2DimensionSelection.md +++ b/src/Monitor/Monitor/help/New-AzMetricAlertRuleV2DimensionSelection.md @@ -22,7 +22,7 @@ The **New-AzMetricAlertRuleV2DimensionSelection** cmdlet creates a local dimensi ## EXAMPLES -### Example 1 : Create a dimension selection object +### Example 1: Create a dimension selection object ```powershell PS C:\> New-AzMetricAlertRuleV2DimensionSelection -DimensionName LUN -ValuesToInclude 1,3,4 diff --git a/src/Monitor/Monitor/help/New-AzScheduledQueryRuleSource.md b/src/Monitor/Monitor/help/New-AzScheduledQueryRuleSource.md index 846fd91d94df..ab25ab36f719 100644 --- a/src/Monitor/Monitor/help/New-AzScheduledQueryRuleSource.md +++ b/src/Monitor/Monitor/help/New-AzScheduledQueryRuleSource.md @@ -30,6 +30,14 @@ PS C:\> $source = New-AzScheduledQueryRuleSource -Query "Heartbeat | summarize A -QueryType "ResultCount" ``` +### Example 2 + +Creates an object of type Source. (autogenerated) + +```powershell +New-AzScheduledQueryRuleSource -DataSourceId -Query 'Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)' +``` + ## PARAMETERS ### -AuthorizedResource diff --git a/src/Monitor/Monitor/help/Remove-AzAutoscaleSetting.md b/src/Monitor/Monitor/help/Remove-AzAutoscaleSetting.md index 3225a251a776..f3ee7cf5e287 100644 --- a/src/Monitor/Monitor/help/Remove-AzAutoscaleSetting.md +++ b/src/Monitor/Monitor/help/Remove-AzAutoscaleSetting.md @@ -25,6 +25,14 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma ## EXAMPLES +### Example 1 + +Removes an Autoscale setting. (autogenerated) + +```powershell +Remove-AzAutoscaleSetting -Name 'LogAlertRule1' -ResourceGroupName MyResourceGroup +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Monitor/Monitor/help/Remove-AzLogProfile.md b/src/Monitor/Monitor/help/Remove-AzLogProfile.md index 2e25477698f6..e84bab951ed9 100644 --- a/src/Monitor/Monitor/help/Remove-AzLogProfile.md +++ b/src/Monitor/Monitor/help/Remove-AzLogProfile.md @@ -24,6 +24,14 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma ## EXAMPLES +### Example 1 + +Removes a log profile. (autogenerated) + +```powershell +Remove-AzLogProfile -Name 'LogAlertRule1' +``` + ## PARAMETERS ### -DefaultProfile diff --git a/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md index d59533daac0a..e48c76e4ce41 100644 --- a/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Remove-AzScheduledQueryRule.md @@ -35,17 +35,17 @@ Removes a Log Alert Rule ## EXAMPLES -### Example 1 - Remove by rule name +### Example 1: Remove by rule name ```powershell PS C:\> Remove-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" ``` -### Example 2 - Remove by input object +### Example 2: Remove by input object ```powershell PS C:\> Remove-AzScheduledQueryRule -InputObject $PSScheduledQueryRuleResource ``` -### Example 3 - Remove by resource Id +### Example 3: Remove by resource Id ```powershell PS C:\> Remove-AzScheduledQueryRule -ResourceId "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledQueryRules/LogAlertRule1" ``` diff --git a/src/Monitor/Monitor/help/Set-AzDiagnosticSetting.md b/src/Monitor/Monitor/help/Set-AzDiagnosticSetting.md index bcec3a9d79f8..ddb83c99468b 100644 --- a/src/Monitor/Monitor/help/Set-AzDiagnosticSetting.md +++ b/src/Monitor/Monitor/help/Set-AzDiagnosticSetting.md @@ -38,21 +38,21 @@ This cmdlet implements the ShouldProcess pattern, i.e. it might request confirma ## EXAMPLES ### Example 1: Enable all metrics and logs for a resource -``` +```powershell PS C:\>Set-AzDiagnosticSetting -ResourceId "Resource01" -Enabled $True ``` This command enables all available metrics and logs for Resource01. ### Example 2: Disable all metrics and logs -``` +```powershell PS C:\>Set-AzDiagnosticSetting -ResourceId "Resource01" -Enabled $False ``` This command disables all available metrics and logs for the resource Resource01. ### Example 3: Enable/disable multiple metrics categories -``` +```powershell PS C:\>Set-AzDiagnosticSetting -ResourceId "Resource01" -Enabled $False -MetricCategory MetricCategory1,MetricCategory2 StorageAccountId : StorageAccountName : @@ -81,7 +81,7 @@ This command disables the metrics categories called Category1 and Category2. All the other categories remain the same. ### Example 4: Enable/disable multiple log categories -``` +```powershell PS C:\>Set-AzDiagnosticSetting -ResourceId "Resource01" -Enabled $True -Category Category1,Category2 StorageAccountId : StorageAccountName : @@ -109,16 +109,16 @@ Logs This command enables Category1 and Category2. All the other metrics and logs categories remain the same. -### Example 4: Enable a time grain and multiple categories -``` +### Example 5: Enable a time grain and multiple categories +```powershell PS C:\>Set-AzDiagnosticSetting -ResourceId "Resource01" -Enabled $True -Category Category1,Category2 -Timegrain PT1M ``` This command enables only Category1, Category2, and time grain PT1M. All other time grains and categories are unchanged. -### Example 5: Using pipeline -``` +### Example 6: Using pipeline +```powershell PS C:\>Get-AzDiagnosticSetting -ResourceId "Resource01" | Set-AzDiagnosticSetting -Enabled $True -Category Category1,Category2 ``` diff --git a/src/Monitor/Monitor/help/Set-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Set-AzScheduledQueryRule.md index 4b53cb01886f..1c4398ce334c 100644 --- a/src/Monitor/Monitor/help/Set-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Set-AzScheduledQueryRule.md @@ -41,7 +41,7 @@ Updates a Log Alert Rule by PUT semantics ## EXAMPLES -### Example 1 - Set by rule name +### Example 1: Set by rule name ```powershell PS C:\> Set-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" -Enabled $true -Location "centralindia" -Action $alertingAction -Description "log alert description" -Schedule $schedule -Source $source @@ -59,7 +59,7 @@ Location : centralindia Tags : {[hidden-link:/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]} ``` -### Example 2 - Set by Input Object +### Example 2: Set by Input Object ```powershell PS C:\> Set-AzScheduledQueryRule -InputObject $sqr -Description "changed description" @@ -77,7 +77,7 @@ Location : centralindia Tags : {[hidden-link:/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]} ``` -### Example 3 - Set by resource Id +### Example 3: Set by resource Id ```powershell PS C:\> Set-AzScheduledQueryRule -ResourceId "/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1" -Enabled $true -Location "centralindia" -Action $alertingAction -Description "change description again" -Schedule $schedule -Source $source diff --git a/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md b/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md index a533f548f8d8..da07048ea9da 100644 --- a/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md +++ b/src/Monitor/Monitor/help/Update-AzScheduledQueryRule.md @@ -36,7 +36,7 @@ To update other properties, see "Set-AzScheduledQueryRule" command. ## EXAMPLES -### Example 1 - Update by rule name +### Example 1: Update by rule name ```powershell PS C:\> Update-AzScheduledQueryRule -ResourceGroupName "MyResourceGroup" -Name "LogAlertRule1" -Enabled $false @@ -54,7 +54,7 @@ Location : centralindia Tags : {[hidden-link:/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]} ``` -### Example 2 - Update by input object +### Example 2: Update by input object ```powershell PS C:\> Update-AzScheduledQueryRule -InputObject $sqr -Enabled $false @@ -72,7 +72,7 @@ Location : centralindia Tags : {[hidden-link:/subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace, Resource]} ``` -### Example 3 - Update by resource Id +### Example 3: Update by resource Id ```powershell PS C:\> Update-AzScheduledQueryRule -ResourceId /subscriptions/ad825170-845c-47db-8f00-11978947b089/resourceGroups/MyResourceGroup/providers/microsoft.insights/scheduledqueryrules/LogAlertRule1 -Enabled $true diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccount.md b/src/Storage/Storage.Management/help/New-AzStorageAccount.md index 35c814928819..717b65a6cfc5 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccount.md @@ -28,28 +28,28 @@ The **New-AzStorageAccount** cmdlet creates an Azure Storage account. ## EXAMPLES ### Example 1: Create a Storage account -``` +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName MyResourceGroup -AccountName mystorageaccount -Location westus -SkuName Standard_GRS ``` This command creates a Storage account for the resource group name MyResourceGroup. ### Example 2: Create a Blob Storage account with BlobStorage Kind and hot AccessTier -``` +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName MyResourceGroup -AccountName mystorageaccount -Location westus -SkuName Standard_GRS -Kind BlobStorage -AccessTier Hot ``` This command creates a Blob Storage account that with BlobStorage Kind and hot AccessTier ### Example 3: Create a Storage account with Kind StorageV2, and Generate and Assign an Identity for Azure KeyVault. -``` +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName MyResourceGroup -AccountName mystorageaccount -Location westus -SkuName Standard_GRS -Kind StorageV2 -AssignIdentity ``` This command creates a Storage account with Kind StorageV2. It also generates and assigns an identity that can be used to manage account keys through Azure KeyVault. ### Example 4: Create a Storage account with NetworkRuleSet from JSON -``` +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName MyResourceGroup -AccountName mystorageaccount -Location westus -Type Standard_LRS -NetworkRuleSet (@{bypass="Logging,Metrics"; ipRules=(@{IPAddressOrRange="20.11.0.0/16";Action="allow"}, @{IPAddressOrRange="10.0.0.0/7";Action="allow"}); @@ -61,21 +61,21 @@ PS C:\>New-AzStorageAccount -ResourceGroupName MyResourceGroup -AccountName myst This command creates a Storage account that has NetworkRuleSet property from JSON ### Example 5: Create a Storage account with Hierarchical Namespace enabled. -``` +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "mystorageaccount" -Location "US West" -SkuName "Standard_GRS" -Kind StorageV2 -EnableHierarchicalNamespace $true ``` This command creates a Storage account with Hierarchical Namespace enabled. ### Example 6: Create a Storage account with Azure Files AAD DS Authentication, and enable large file share. -``` +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "mystorageaccount" -Location "eastus2euap" -SkuName "Standard_LRS" -Kind StorageV2 -EnableAzureActiveDirectoryDomainServicesForFile $true -EnableLargeFileShare ``` This command creates a Storage account with Azure Files AAD DS Authentication, and enable large file share.. -### Example 8: Create a Storage account with Queue and Table Service use account-scoped encryption key. -``` +### Example 7: Create a Storage account with Queue and Table Service use account-scoped encryption key. +```powershell PS C:\>New-AzStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "mystorageaccount" -Location "eastus2euap" -SkuName "Standard_LRS" -Kind StorageV2 -EncryptionKeyTypeForTable Account -EncryptionKeyTypeForQueue Account PS C:\>$account = get-AzStorageAccount -ResourceGroupName $rgname -StorageAccountName $accountName