AZ-700 · Question #82
With the help of PowerShell, you need to retrieve/get an existing workspace named internWorkspace in a resource group named internWorkspaces. Which of the following cmdlets would you use?
The correct answer is B. Get-AzOperationalInsightsWorkspace. Explanation: An existing Log Analytics workspace can be retrieved with the Get- AzOperationalInsightsWorkspace cmdlet. For example, to retrieve/get an existing workspace named internWorkspace in a resource group named internWorkspaces, use the below-given $Oms=Get-AzOperationalIn
Question
With the help of PowerShell, you need to retrieve/get an existing workspace named internWorkspace in a resource group named internWorkspaces. Which of the following cmdlets would you use?
Options
- AGet-AzNetworkSecurityGroup
- BGet-AzOperationalInsightsWorkspace
- CRetrieve-AzOperationalInsightsWorkspace
- DGet-AzWorkspace
- ENew-AzOperationalInsightsWorkspace.
How the community answered
(31 responses)- A3% (1)
- B74% (23)
- C6% (2)
- D3% (1)
- E13% (4)
Explanation
Explanation: An existing Log Analytics workspace can be retrieved with the Get- AzOperationalInsightsWorkspace cmdlet. For example, to retrieve/get an existing workspace named internWorkspace in a resource group named internWorkspaces, use the below-given $Oms=Get-AzOperationalInsightsWorkspace -ResourceGroupName internWorkspaces -Name internWorkspace Option A is incorrect. Get-AzNetworkSecurityGroup cmdlet is used to retrieve the network security group(NSG) for which you want to enable resource logging. Option B is correct. An existing Log Analytics workspace can be retrieved with the Get- AzOperationalInsightsWorkspace cmdlet. Option C is incorrect. Retrieve-AzOperationalInsightsWorkspace is not the right cmdlet. Option D is incorrect. Get-AzWorkspace is not the right command to retrieve the existing log analytics workspace. Option E is incorrect. The new-AzOperationalInsightsWorkspace cmdlet is used to create a new https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-nsg-manage- log?WT.mc_id=modinfra-33046-thmaure
Community Discussion
No community discussion yet for this question.