Skip to content

Commit

Permalink
format the help markdown file of Az.Security (#18437)
Browse files Browse the repository at this point in the history
* format the help markdown file of Az.Security

* format az.security help markdown file

* format az.security help markdown file

* format the help markdown file of Az.Security

Co-authored-by: Ziyue Zheng <[email protected]>
  • Loading branch information
CaptainFanZzz and ziyuezh576 authored Jun 22, 2022
1 parent 6ff7d97 commit 7921911
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/Security/Security/help/Confirm-AzSecurityAutomation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Validates the security automation model before create or update. Any validation

### Example 1
```powershell
PS C:\> Confirm-AzSecurityAutomation -Name 'SampleAutomation' -ResourceGroupName 'SampleResourceGroup' -Description 'Sample security automation' -Scope $scopes -Source $sources -Action $actions
Confirm-AzSecurityAutomation -Name 'SampleAutomation' -ResourceGroupName 'SampleResourceGroup' -Description 'Sample security automation' -Scope $scopes -Source $sources -Action $actions
```

Validates that the creation of security automation named "SampleAutomation" under resource group named "SampleResourceGroup"
Expand Down
4 changes: 2 additions & 2 deletions src/Security/Security/help/Get-AzAlertsSuppressionRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Gets or list alerts suppression rules.

### Example 1
```powershell
PS C:\> Get-AzAlertsSuppressionRule
Get-AzAlertsSuppressionRule
```

List all alerts suppression rules in the subscription.

### Example 2
```powershell
PS C:\> Get-AzAlertsSuppressionRule -Name "Example"
Get-AzAlertsSuppressionRule -Name "Example"
```

Gets an alerts suppression rule with the name "Example".
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Security/help/Get-AzSecurityAutomation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Gets security automations

### Example 1
```powershell
PS C:\> Get-AzSecurityAutomation
Get-AzSecurityAutomation
```

Gets all security automations under the subscription
Expand Down
4 changes: 2 additions & 2 deletions src/Security/Security/help/Get-AzSecurityPricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ Gets the status of each Azure Defender plan for the subscription.
### Example 2

```powershell
Get-AzSecurityPricing -ResourceId
Get-AzSecurityPricing -ResourceId '/subscriptions/fbaa2b23-e9dd-4bed-93c1-9e2a44f64bc0/providers/Microsoft.Security/pricings/VirtualMachines'
```

Gets pricing details of the specific resource ID. Where ResourceId is one of the IDs returned by `Get-AzSecurityPricing`.

### Example 3

```powershell
Get-AzSecurityPricing -Name
Get-AzSecurityPricing -Name 'VirtualMachines'
```

Gets pricing details of the named Azure Defender plan. Where `name` is one of the names returned by `Get-AzSecurityPricing`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Usable in Set-AzAlertsSuppressionRule as part of the -AllOf parameter.

### Example 1
```powershell
PS C:\> $scope1 = New-AzAlertsSuppressionRuleScope -Field "entities.account.name" -Contains "Example"
$scope1 = New-AzAlertsSuppressionRuleScope -Field "entities.account.name" -ContainsSubstring "Example"
```

Creates a PSScopeElementContains.

### Example 2
```powershell
PS C:\> $scope2 = New-AzAlertsSuppressionRuleScope -Field "entities.file.name" -In "FileName1","FileName2","FileName3"
$scope2 = New-AzAlertsSuppressionRuleScope -Field "entities.file.name" -AnyOf "FileName1","FileName2","FileName3"
```

Creates a PSScopeElementIn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The AzIotSecuritySolutionUserDefinedResourcesObject cmdlet creates a new user de

### Example 1
```powershell
New-AzIotSecuritySolutionUserDefinedResourcesObject -Query 'where type != "microsoft.devices/iothubs" | where name contains "v2"'
New-AzIotSecuritySolutionUserDefinedResourcesObject -Query 'where type != "microsoft.devices/iothubs" | where name contains "v2"' `
-QuerySubscriptionList @("XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX")
```

Expand Down
2 changes: 1 addition & 1 deletion src/Security/Security/help/New-AzSecurityAutomation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Creates new security automation

### Example 1
```powershell
PS C:\> New-AzSecurityAutomation -Name 'ampleAutomation' -ResourceGroupName 'SampleResourceGroup' -Description 'Sample security automation' -Scope $scopes -Source $sources -Action $actions
New-AzSecurityAutomation -Name 'ampleAutomation' -ResourceGroupName 'SampleResourceGroup' -Description 'Sample security automation' -Scope $scopes -Source $sources -Action $actions
```

Creates new security automation named "SampleAutomation" under resource group named "SampleResourceGroup"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ Creates new security automation action object

### Example 1
```powershell
PS C:\> New-AzSecurityAutomationActionObject -WorkspaceResourceId '/subscriptions/64ac75e7-15ff-4963-8c07-a16016505e0f/resourceGroups/sampleResourceGroup/providers/Microsoft.OperationalInsights/workspaces/surashed-test'
New-AzSecurityAutomationActionObject -WorkspaceResourceId '/subscriptions/64ac75e7-15ff-4963-8c07-a16016505e0f/resourceGroups/sampleResourceGroup/providers/Microsoft.OperationalInsights/workspaces/surashed-test'
```

Creates new security automation action with workspace type

### Example 2
```powershell
PS C:\> New-AzSecurityAutomationActionObject -LogicAppResourceId '/subscriptions/03b601f1-7eca-4496-8f8d-355219eee254/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/workflows/LA' -Uri 'https://dummy.com/'
New-AzSecurityAutomationActionObject -LogicAppResourceId '/subscriptions/03b601f1-7eca-4496-8f8d-355219eee254/resourceGroups/sampleResourceGroup/providers/Microsoft.Logic/workflows/LA' -Uri 'https://dummy.com/'
```

Creates new security automation action with logicApp type

### Example 3
```powershell
PS C:\> New-AzSecurityAutomationActionObject -EventHubResourceId 'subscriptions/03b601f1-7eca-4496-8f8d-355219eee254/resourceGroups/sampleResourceGroup/providers/Microsoft.EventHub/namespaces/cus-wsp-fake-assessment/eventhubs/cus-wsp-fake-assessment' -ConnectionString 'Endpoint=sb://dummy/;SharedAccessKeyName=dummy;SharedAccessKey=dummy;EntityPath=dummy'
New-AzSecurityAutomationActionObject -EventHubResourceId 'subscriptions/03b601f1-7eca-4496-8f8d-355219eee254/resourceGroups/sampleResourceGroup/providers/Microsoft.EventHub/namespaces/cus-wsp-fake-assessment/eventhubs/cus-wsp-fake-assessment' -ConnectionString 'Endpoint=sb://dummy/;SharedAccessKeyName=dummy;SharedAccessKey=dummy;EntityPath=dummy'
```

Creates new security automation action with even-hub type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Creates security automation rule object

### Example 1
```powershell
PS C:\> New-AzSecurityAutomationRuleObject -PropertyJPath 'properties.metadata.severity' -PropertyType 'String' -Operator 'Equals' -ExpectedValue 'High'
New-AzSecurityAutomationRuleObject -PropertyJPath 'properties.metadata.severity' -PropertyType 'String' -Operator 'Equals' -ExpectedValue 'High'
```

Creates security automation rule object that filters messages that with "High" severity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Creates security automation rule set object

### Example 1
```powershell
PS C:\> New-AzSecurityAutomationRuleSetObject -Rule $rule
New-AzSecurityAutomationRuleSetObject -Rule $rule
```

Creates security automation rule set object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Creates security automation scope object

### Example 1
```powershell
PS C:\> New-AzSecurityAutomationScopeObject -Description 'Security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5' -ScopePath '/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup'
New-AzSecurityAutomationScopeObject -Description 'Security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5' -ScopePath '/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup'
```

Creates security automation scope object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Creates security automation source object

### Example 1
```powershell
PS C:\> New-AzSecurityAutomationSourceObject -EventSource 'Assessments' -RuleSet $ruleSet
New-AzSecurityAutomationSourceObject -EventSource 'Assessments' -RuleSet $ruleSet
```

Creates security automation source object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Deletes an alerts suppression rule.

### Example 1
```powershell
PS C:\> Remove-AzAlertsSuppressionRule -Name "Example"
Remove-AzAlertsSuppressionRule -Name "Example"
```

Deleted an alerts suppression rule with the name "Example"
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Security/help/Remove-AzSecurityAutomation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Deletes security automation

### Example 1
```powershell
PS C:\> Remove-AzSecurityAutomation -ResourceGroupName 'sampleResourceGroup' -Name 'sampleAutomation'
Remove-AzSecurityAutomation -ResourceGroupName 'sampleResourceGroup' -Name 'sampleAutomation'
```

Deletes security automation named 'sampleAutomation' under resource group named 'sampleResourceGroup'
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Security/help/Set-AzAlertsSuppressionRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create or update an alerts suppression rule.

### Example 1
```powershell
PS C:\> Set-AzAlertsSuppressionRule -Name "Example" -State Enabled -Comment "Example of a comment" -AlertType "AzureDNS_CurrencyMining" -Reason "Other" -AllOf @([Microsoft.Azure.Commands.Security.Models.AlertsSuppressionRules.PSScopeElementContains]::new("entities.account.name", "example")) -ExpirationDateUtc 2024-10-17T15:02:24.7511441Z
Set-AzAlertsSuppressionRule -Name "Example" -State Enabled -Comment "Example of a comment" -AlertType "AzureDNS_CurrencyMining" -Reason "Other" -AllOf @([Microsoft.Azure.Commands.Security.Models.AlertsSuppressionRules.PSScopeElementContains]::new("entities.account.name", "example")) -ExpirationDateUtc 2024-10-17T15:02:24.7511441Z
```

The above example creates a new suppression rule with the name "Example" to suppress alerts of type (Digital currency mining activity)[https://docs.microsoft.com/en-us/azure/defender-for-cloud/alerts-reference] that contains "example" as part of their account name.
Expand Down
6 changes: 3 additions & 3 deletions src/Security/Security/help/Set-AzDeviceSecurityGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ The Set-AzDeviceSecurityGroup cmdlet creates or updates a device security group
### Example 1
```powershell
$TimeWindowSize = New-TimeSpan -Minutes 5
$TimeWindowRule = New-AzDeviceSecurityGroupTimeWindowRuleObject -Type "ActiveConnectionsNotInAllowedRange" -Enabled $true
$TimeWindowRule = New-AzDeviceSecurityGroupTimeWindowRuleObject -Type "ActiveConnectionsNotInAllowedRange" -Enabled $true `
-MaxThreshold 30 -MinThreshold 0 -TimeWindowSize $TimeWindowSize
Set-AzDeviceSecurityGroup -Name "MySecurityGroup"
-HubResourceId "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub"
Set-AzDeviceSecurityGroup -Name "MySecurityGroup" `
-HubResourceId "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MyResourceGroup/providers/Microsoft.Devices/IotHubs/MyHub" `
-TimeWindowRule $TimeWindowRules
```

Expand Down
2 changes: 1 addition & 1 deletion src/Security/Security/help/Set-AzIotSecuritySolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The name of iot security solution should be identical to the name of the iot hub
```powershell
$Workspace = "/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MichalResourceGroup/providers/Microsoft.OperationalInsights/workspaces/IoTHubWorkspace"
$IotHubs = @("/subscriptions/XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX/resourceGroups/MichalResourceGroup/providers/Microsoft.Devices/IotHubs/MySample")
Set-AzIotSecuritySolution -Name "MySample" -ResourceGroupName "MyResourceGroup" -Location "West US"
Set-AzIotSecuritySolution -Name "MySample" -ResourceGroupName "MyResourceGroup" -Location "West US" `
-Workspace $Workspace -DisplayName "MySample" -Enabled $true -IotHub $IotHubs
```

Expand Down
4 changes: 2 additions & 2 deletions src/Security/Security/help/Update-AzIotSecuritySolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ The IoT security solution collects security data and events from iot devices and
### Example 1
```powershell
$RecConfig = New-AzIotSecuritySolutionRecommendationConfigurationObject -RecommendationType "IoT_OpenPorts" -Enabled $false
$UserDefinedResource = New-AzIotSecuritySolutionUserDefinedResourcesObject -Query 'where type != "microsoft.devices/iothubs" | where name contains "v2"'
-QuerySubscriptionList @("XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX")
$UserDefinedResource = New-AzIotSecuritySolutionUserDefinedResourcesObject -Query 'where type != "microsoft.devices/iothubs" | where name contains "v2"' `
-QuerySubscriptionList @("XXXXXXXX-XXXX-XXXXX-XXXX-XXXXXXXXXXXX")
Update-AzIotSecuritySolution -Name "MySample" -ResourceGroupName "MyResourceGroup" -RecommendationsConfiguration @($RecConfig) -UserDefinedResource $UserDefinedResource
```

Expand Down

0 comments on commit 7921911

Please sign in to comment.