Skip to content

Update New-AzOperationalInsightsWindowsEventDataSource.md #9843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/OperationalInsights/OperationalInsights/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-->
## Upcoming Release
* Fixed miscellaneous typos across module
* Added an example for New-AzOperationalInsightsWindowsEventDataSource
* Changed the description of the -Name parameter for New-AzOperationalInsightsWindowsEventDataSource

## Version 1.3.2
* Updated default version for saved searches to be 1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,34 @@ The **New-AzOperationalInsightsWindowsEventDataSource** cmdlet adds a data sourc

## EXAMPLES

### Example 1: Create system Windows event data source
```
$EventLogNames = @()
$EventLogNames += 'Directory Service'
$EventLogNames += 'Microsoft-Windows-EventCollector/Operational'
$EventLogNames += 'System'
$ResourceGroupName = 'MyResourceGroup'
$WorkspaceName = 'MyWorkspaceName'

$Count = 0
foreach ($EventLogName in $EventLogNames) {
$Count++
$null = New-AzOperationalInsightsWindowsEventDataSource `
-ResourceGroupName $ResourceGroupName `
-WorkspaceName $WorkspaceName `
-Name "Windows-event-$($Count)" `
-EventLogName $EventLogName `
-CollectErrors `
-CollectWarnings `
-CollectInformation
}

Get-AzOperationalInsightsDataSource `
-ResourceGroupName $ResourceGroupName `
-WorkspaceName $WorkspaceName `
-Kind 'WindowsEvent'
```

## PARAMETERS

### -CollectErrors
Expand Down Expand Up @@ -125,7 +153,7 @@ Accept wildcard characters: False
```

### -Name
Specifies a name for the data source.
Specifies a name for the data source. The name is not exposed in the Azure Portal and any string can be used as long as it is unique.

```yaml
Type: System.String
Expand Down