Skip to content

Commit 0bc39eb

Browse files
committed
Adding description to cmdlets
1 parent 7be164d commit 0bc39eb

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

articles/azure-monitor/logs/search-jobs.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -146,30 +146,20 @@ Status code: 202 accepted.
146146

147147
To run a search job, run the [az monitor log-analytics workspace table search-job create](/cli/azure/monitor/log-analytics/workspace/table/search-job#az-monitor-log-analytics-workspace-table-search-job-create) command. The name of the results table, which you set using the `--name` parameter, must end with *_SRCH*.
148148

149-
For example:
149+
**Example**
150150

151151
```azurecli
152152
az monitor log-analytics workspace table search-job create --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name HeartbeatByIp_SRCH --search-query 'Heartbeat | where ComputerIP has "00.000.00.000"' --limit 1500 --start-search-time "2022-01-01T00:00:00.000Z" --end-search-time "2022-01-08T00:00:00.000Z" --no-wait
153153
```
154154

155155
### [PowerShell](#tab/powershell-1)
156156

157+
To run a search job, run the [New-AzOperationalInsightsSearchTable](/powershell/module/az.operationalinsights/new-azoperationalinsightssearchtable?view=azps-12.0.0) command. The name of the results table, which you set using the `TableName` parameter, must end with *_SRCH*.
158+
159+
**Example**
160+
157161
```powershell
158-
New-AzOperationalInsightsSearchTable
159-
[-ResourceGroupName] <String>
160-
[-WorkspaceName] <String>
161-
[-TableName] <String>
162-
[[-RetentionInDays] <Int32>]
163-
[-TotalRetentionInDays <Int32>]
164-
-SearchQuery <String>
165-
-StartSearchTime <String>
166-
-EndSearchTime <String>
167-
[-Limit <Int32>]
168-
[-AsJob]
169-
[-DefaultProfile <IAzureContextContainer>]
170-
[-WhatIf]
171-
[-Confirm]
172-
[<CommonParameters>]
162+
New-AzOperationalInsightsSearchTable -ResourceGroupName ContosoRG -WorkspaceName ContosoWorkspace -TableName HeartbeatByIp_SRCH -SearchQuery "Heartbeat" -StartSearchTime "01-01-2022 00:00:00" -EndSearchTime "01-01-2022 00:00:00"
173163
```
174164

175165
---
@@ -252,23 +242,25 @@ GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000
252242

253243
To check the status and details of a search job table, run the [az monitor log-analytics workspace table show](/cli/azure/monitor/log-analytics/workspace/table#az-monitor-log-analytics-workspace-table-show) command.
254244

255-
For example:
245+
**Example**
256246

257247
```azurecli
258248
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name HeartbeatByIp_SRCH --output table \
259249
```
260250

261251
### [PowerShell](#tab/powershell-2)
262252

253+
To check the status and details of a search job table, run the [Get-AzOperationalInsightsTable](/powershell/module/az.operationalinsights/get-azoperationalinsightstable?view=azps-12.0.0) command.
254+
255+
**Example**
256+
263257
```powershell
264-
Get-AzOperationalInsightsTable
265-
[-ResourceGroupName] <String>
266-
[-WorkspaceName] <String>
267-
[[-TableName] <String>]
268-
[-DefaultProfile <IAzureContextContainer>]
269-
[<CommonParameters>]
258+
Get-AzOperationalInsightsTable -ResourceGroupName "ContosoRG" -WorkspaceName "ContosoWorkspace" -tableName "HeartbeatByIp_SRCH"
270259
```
271260

261+
> [!NOTE]
262+
> When "-TableName" is not provided, the command will instead list all tables associated with a workspace.
263+
272264
---
273265

274266
## Delete a search job table

0 commit comments

Comments
 (0)