File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
src/OperationalInsights/OperationalInsights Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 19
19
-->
20
20
## Upcoming Release
21
21
* Fixed miscellaneous typos across module
22
+ * Added an example for New-AzOperationalInsightsWindowsEventDataSource
23
+ * Changed the description of the -Name parameter for New-AzOperationalInsightsWindowsEventDataSource
22
24
23
25
## Version 1.3.2
24
26
* Updated default version for saved searches to be 1.
Original file line number Diff line number Diff line change @@ -32,6 +32,34 @@ The **New-AzOperationalInsightsWindowsEventDataSource** cmdlet adds a data sourc
32
32
33
33
## EXAMPLES
34
34
35
+ ### Example 1: Create system Windows event data source
36
+ ```
37
+ $EventLogNames = @()
38
+ $EventLogNames += 'Directory Service'
39
+ $EventLogNames += 'Microsoft-Windows-EventCollector/Operational'
40
+ $EventLogNames += 'System'
41
+ $ResourceGroupName = 'MyResourceGroup'
42
+ $WorkspaceName = 'MyWorkspaceName'
43
+
44
+ $Count = 0
45
+ foreach ($EventLogName in $EventLogNames) {
46
+ $Count++
47
+ $null = New-AzOperationalInsightsWindowsEventDataSource `
48
+ -ResourceGroupName $ResourceGroupName `
49
+ -WorkspaceName $WorkspaceName `
50
+ -Name "Windows-event-$($Count)" `
51
+ -EventLogName $EventLogName `
52
+ -CollectErrors `
53
+ -CollectWarnings `
54
+ -CollectInformation
55
+ }
56
+
57
+ Get-AzOperationalInsightsDataSource `
58
+ -ResourceGroupName $ResourceGroupName `
59
+ -WorkspaceName $WorkspaceName `
60
+ -Kind 'WindowsEvent'
61
+ ```
62
+
35
63
## PARAMETERS
36
64
37
65
### -CollectErrors
@@ -125,7 +153,7 @@ Accept wildcard characters: False
125
153
` ` `
126
154
127
155
### -Name
128
- Specifies a name for the data source.
156
+ 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.
129
157
130
158
` ` ` yaml
131
159
Type : System.String
You can’t perform that action at this time.
0 commit comments