Skip to content

Commit daaaa54

Browse files
authored
Merge pull request Azure#9562 from thomast1906/patch-1
Update New-AzOperationalInsightsStorageInsight.md
2 parents b9d2776 + daa40de commit daaaa54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/OperationalInsights/OperationalInsights/help/New-AzOperationalInsightsStorageInsight.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ The **New-AzOperationalInsightsStorageInsight** cmdlet creates a new Storage Ins
3838
```
3939
PS C:\>$Storage = Get-AzStorageAccount -ResourceGroupName "ContosoResourceGroup" -Name "ContosoStorage"
4040
41-
PS C:\>$StorageKey = ($Storage | Get-AzStorageAccountKey).Key1
41+
PS C:\>$StorageKey = ($Storage | Get-AzStorageAccountKey).Value[0]
4242
4343
PS C:\>New-AzOperationalInsightsStorageInsight -ResourceGroupName "ContosoResourceGroup" -WorkspaceName "MyWorkspace" -Name "MyStorageInsight" -StorageAccountResourceId $Storage.Id -StorageAccountKey $StorageKey -Tables @("WADWindowsEventLogsTable")
4444
```
4545

4646
The first command uses the Get-AzStorageAccount cmdlet to get the storage account named ContosoStorage, and then stores it in the $Storage variable.
47-
The second command passes the storage account in $Storage to the Get-AzStorageAccountKey cmdlet by using the pipeline operator to get the specified storage account key, and then stores it in the $StorageKey variable.
47+
The second command passes the storage account in $Storage to the Get-AzStorageAccountKey cmdlet by using the pipeline operator to get the specified storage account key, and then stores it in the $StorageKey variable. This example retrieves the first key. To retrieve the other one, use Value[1] instead of Value[0].
4848
The final command creates a storage insight named MyStorageInsight in the workspace named MyWorkspace.
4949
This storage insight consumes data from the WADWindowsEventLogsTable table in the specified storage account resource.
5050

@@ -54,14 +54,14 @@ PS C:\>$Workspace = Get-AzOperationalInsightsWorkspace -ResourceGroupName "Conto
5454
5555
PS C:\>$Storage = Get-AzStorageAccount -ResourceGroupName "ContosoResourceGroup" -Name "ContosoStorage"
5656
57-
PS C:\>$StorageKey = ($Storage | Get-AzStorageAccountKey).Key1
57+
PS C:\>$StorageKey = ($Storage | Get-AzStorageAccountKey).Value[0]
5858
5959
PS C:\>New-AzOperationalInsightsStorageInsight -Workspace $Workspace -Name "MyStorageInsight" -StorageAccountResourceId $Storage.Id -StorageAccountKey $StorageKey -Tables @("WADWindowsEventLogsTable")
6060
```
6161

6262
The first command uses the Get-AzOperationalInsightsWorkspace cmdlet to get the workspace named MyWorkspace, and then stores it in the $Workspace variable.
6363
The second command uses the Get-AzStorageAccount cmdlet to get the specified storage account, and then stores it in the $Storage variable.
64-
The third command passes the storage account in $Storage to the Get-AzStorageAccountKey cmdlet by using the pipeline operator to get the specified key, and then stores it in the $StorageKey variable.
64+
The third command passes the storage account in $Storage to the Get-AzStorageAccountKey cmdlet by using the pipeline operator to get the specified key, and then stores it in the $StorageKey variable. This example retrieves the first key. To retrieve the other one, use Value[1] instead of Value[0].
6565
The final command creates a storage insight named MyStorageInsight in the workspace defined in $Workspace.
6666
The Storage Insight consumes data from the WADWindowsEventLogsTable table in the specified storage account resource.
6767

0 commit comments

Comments
 (0)