Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Get or list clusters, list clusters under resource group when "-ClusterName" was

### Example 1
```powershell
Get-AzOperationalInsightsCluster -ResourceGroupName {rg-name} -ClusterName {cluster-name}
Get-AzOperationalInsightsCluster -ResourceGroupName "rg-name" -ClusterName "cluster-name"
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gets a workspace's Data export by name or all existing workspace's data exports.

### Example 1
```powershell
Get-AzOperationalInsightsDataExport -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataExportName {dataExportName}
Get-AzOperationalInsightsDataExport -ResourceGroupName rg-name -WorkspaceName workspace-name -DataExportName dataExportName
```

```output
Expand All @@ -59,7 +59,7 @@ Gets a workspace's Data export.

### Example 2
```powershell
Get-AzOperationalInsightsDataExport -ResourceGroupName {rg-name} -WorkspaceName {workspace-name}
Get-AzOperationalInsightsDataExport -ResourceGroupName rg-name -WorkspaceName workspace-name
```

Gets all workspace's Data exports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Get or list linked service for workspace, list when "-LinkedServiceName" was not

### Example 1
```powershell
Get-AzOperationalInsightsLinkedService -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -LinkedServiceName cluster
Get-AzOperationalInsightsLinkedService -ResourceGroupName rg-name -WorkspaceName workspace-name -LinkedServiceName cluster
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Get linked storage account, list all linked storage accounts when "-DataSourceTy

### Example 1
```powershell
Get-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName {rg-name} -WorkspaceName {workspace-name}
Get-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName rg-name -WorkspaceName workspace-name
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Get the status of a long running azure asynchronous operation.

### Example 1
```powershell
Get-AzOperationalInsightsOperationStatus -Location {location} -OperationId {op_id}
Get-AzOperationalInsightsOperationStatus -Location location -OperationId op_id
```

gets a long running azure asynchronous operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This command creates an application-insights data source of a given application

### Example 2: Get workspace object and create application-insights data source by the application resource id
```powershell
Get-AzureRmOperationalInsightsWorkspace -Name "MyWorkspace" -ResourceGroupName "ContosoResourceGroup" | New-AzOperationalInsightsApplicationInsightsDataSource -ApplicationResourceId "/subscriptions/e791a474-ee54-46a2-bb06-5e058302d234/resourceGroups/ContosoResourceGroup/providers/microsoft.insights/components/MyAIApplication"
Get-AzOperationalInsightsDeletedWorkspace -Name "MyWorkspace" -ResourceGroupName "ContosoResourceGroup" | New-AzOperationalInsightsApplicationInsightsDataSource -ApplicationResourceId "/subscriptions/e791a474-ee54-46a2-bb06-5e058302d234/resourceGroups/ContosoResourceGroup/providers/microsoft.insights/components/MyAIApplication"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "deleted" workspace?

```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Create cluster

### Example 1
```powershell
New-AzOperationalInsightsCluster -ResourceGroupName {rg-name} -ClusterName {cluster-name} -Location eastus -IdentityType SystemAssigned -SkuName CapacityReservation -SkuCapacity 1000
New-AzOperationalInsightsCluster -ResourceGroupName rg-name -ClusterName cluster-name -Location eastus -IdentityType SystemAssigned -SkuName CapacityReservation -SkuCapacity 1000
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Creates a computer group. (autogenerated)


```powershell
New-AzOperationalInsightsComputerGroup -Category 'ContosoSavedSearchCategory' -DisplayName 'ContosoSavedSearchDisplayName' -Query 'Type=Event' -ResourceGroupName myresourcegroup -SavedSearchId 'ContosoSavedSearchId' -Version 1 -WorkspaceName <String>
New-AzOperationalInsightsComputerGroup -Category 'ContosoSavedSearchCategory' -DisplayName 'ContosoSavedSearchDisplayName' -Query 'Type=Event' -ResourceGroupName myresourcegroup -SavedSearchId 'ContosoSavedSearchId' -Version 1 -WorkspaceName 'workspacename'
```

## PARAMETERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Creates data export for a workspace.

### Example 1
```powershell
New-AzOperationalInsightsDataExport -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataExportName {dataExportName} -TableNames {table_names} -ResourceId {resource}
New-AzOperationalInsightsDataExport -ResourceGroupName rg-name -WorkspaceName workspace-name -DataExportName dataExportName -TableName table_names -ResourceId {resource}
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Create linked storage account for workspace

### Example 1
```powershell
$account = Get-AzStorageAccount -ResourceGroupName {rg-name} -Name {account-name}
$account = Get-AzStorageAccount -ResourceGroupName rg-name -Name account-name

New-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataSourceType CustomLogs -StorageAccountIds $account.Id
New-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName rg-name -WorkspaceName workspace-name -DataSourceType CustomLogs -StorageAccountId $account.Id
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ foreach ($FacilityName in $FacilityNames) {
-ResourceGroupName $ResourceGroupName `
-WorkspaceName $WorkspaceName `
-Name "Linux-syslog-$($Count)" `
-Facility $FacilityName `
-Facility $FacilityNames `
-CollectEmergency `
-CollectAlert `
-CollectCritical `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The **New-AzOperationalInsightsSavedSearch** cmdlet creates a new saved search w

### Example 1: Create a new saved search
```powershell
New-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "*" -Version $Version -Force
New-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "*" -Version 2 -Force
```

This command creates a new saved search.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ foreach ($EventLogName in $EventLogNames) {
-ResourceGroupName $ResourceGroupName `
-WorkspaceName $WorkspaceName `
-Name "Windows-event-$($Count)" `
-EventLogName $EventLogName `
-EventLogName $EventLogNames `
-CollectErrors `
-CollectWarnings `
-CollectInformation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This command creates a standard SKU workspace named MyWorkspace in the resource

### Example 2: Create a workspace and link it to an existing account
```powershell
$OILinkTargets = Get-AzOperationalInsightsLinkTargets
$OILinkTargets = Get-AzOperationalInsightsWorkspace

$OILinkTargets[0] | New-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace"
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Delete cluster, only apply to clusters with provisioning state "Succeeded"

### Example 1
```powershell
Remove-AzOperationalInsightsCluster -ResourceGroupName {rg-name} -ClusterName {cluster-name}
Remove-AzOperationalInsightsCluster -ResourceGroupName rg-name -ClusterName cluster-name
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Deletes a data export for a given worksace

### Example 1
```powershell
Remove-AzOperationalInsightsDataExport -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataExportName {dataExportName}
Remove-AzOperationalInsightsDataExport -ResourceGroupName rg-name -WorkspaceName workspace-name -DataExportName dataExportName
```

removed data export
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Unlink service for workspace

### Example 1
```powershell
Remove-AzOperationalInsightsLinkedService -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -LinkedServiceName cluster
Remove-AzOperationalInsightsLinkedService -ResourceGroupName rg-name -WorkspaceName workspace-name -LinkedServiceName cluster
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Delete linked storage account for workspace

### Example 1
```powershell
Remove-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataSourceType CustomLogs
Remove-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName rg-name -WorkspaceName workspace-name -DataSourceType CustomLogs
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The **Remove-AzOperationalInsightsSavedSearch** cmdlet removes a saved search fr

### Example 1: Remove a saved search
```powershell
Remove-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -Force
Remove-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId"
```

This command removes a saved search from the workspace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ link service for workspace

### Example 1
```powershell
Set-AzOperationalInsightsLinkedService -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -LinkedServiceName cluster -WriteAccessResourceId /subscriptions/{subscription}/resourceGroups/{rg-name}/providers/Microsoft.OperationalInsights/clusters/{cluster-name}
Set-AzOperationalInsightsLinkedService -ResourceGroupName rg-name -WorkspaceName workspace-name -LinkedServiceName cluster -WriteAccessResourceId /subscriptions/subscription/resourceGroups/rg-name/providers/Microsoft.OperationalInsights/clusters/cluster-name
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Set linked storage account for workspace

### Example 1
```powershell
$account = Get-AzStorageAccount -ResourceGroupName {rg-name} -Name {account-name}
$account = Get-AzStorageAccount -ResourceGroupName rg-name -Name account-name

Set-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataSourceType CustomLogs -StorageAccountIds $account.Id
Set-AzOperationalInsightsLinkedStorageAccount -ResourceGroupName rg-name -WorkspaceName workspace-name -DataSourceType CustomLogs -StorageAccountId $account.Id
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The **Set-AzOperationalInsightsSavedSearch** cmdlet updates a saved search that

### Example 1: Sets a saved search with updated properties
```powershell
Set-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "Type=Event" -Version $Version -ETag "ContosoSavedSearchEtag"
Set-AzOperationalInsightsSavedSearch -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "ContosoWorkspace" -SavedSearchId "ContosoSavedSearchId" -DisplayName "ContosoSavedSearchDisplayName" -Category "ContosoSavedSearchCategory" -Query "Type=Event" -Version 3.1.0 -ETag "ContosoSavedSearchEtag"
```

This command sets a saved search with updated properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The **Set-AzOperationalInsightsWorkspace** cmdlet changes the configuration of a

### Example 1: Modify a workspace by name
```powershell
Set-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Sku Standard -Tags @{ "Department" = "IT" }
Set-AzOperationalInsightsWorkspace -ResourceGroupName "ContosoResourceGroup" -Name "MyWorkspace" -Sku Standard -Tag @{ "Department" = "IT" }
```

This command modifies the SKU and tags of the workspace named MyWorkspace in the resource group named ContosoResourceGroup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ update cluster

### Example 1
```powershell
Update-AzOperationalInsightsCluster -ResourceGroupName azps-test-group -ClusterName yabo-cluster10 -Location eastus -SkuName CapacityReservation -SkuCapacity 1200 -KeyVaultUri {uri} -KeyName {key-name} -KeyVersion {version}
Update-AzOperationalInsightsCluster -ResourceGroupName azps-test-group -ClusterName yabo-cluster10 -SkuName CapacityReservation -SkuCapacity 1200 -KeyVaultUri uri -KeyName key-name -KeyVersion version
```

```output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Updates a data export.

### Example 1
```powershell
Update-AzOperationalInsightsDataExport -ResourceGroupName {rg-name} -WorkspaceName {workspace-name} -DataExportName {dataExportName} -TableNames {table_names} -Enable $true
Update-AzOperationalInsightsDataExport -ResourceGroupName rg-name -WorkspaceName workspace-name -DataExportName dataExportName -TableName table_names -Enable $true
```

```output
Expand Down