Send Azure Stack Diagnostic Logs with PowerShell | Exam AZ-600 Guide

Send Azure Stack Diagnostic Logs with PowerShell

Question

You want to use the Send logs now method to send the diagnostic logs for Event Hubs and decide to use PowerShell rather than the administrator portal.

Complete the below-given cmdlet that would you use for this purpose.

Send-AzureStackDiagnosticLog -………………………… eventhub.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: D

Send-AzureStackDiagnosticLog cmdlet with FilterByResourceProvider parameter is used to send diagnostic logs for value-add Resource Providers (RPs).

Option A is incorrect.

FilterByLogType parameter is used to filter logs by type.

You can select to filter by Share, File, or WindowsEvent.

Option B is incorrect.

FilterByNode parameter is used to filter logs by computer name.

Option C is incorrect.

FilterByRole parameter is used to send diagnostic logs from VMs and BareMetal roles.

Option D is correct.

FilterByResourceProvider parameter is used to send diagnostic logs for value-add Resource Providers (RPs)

Send-AzureStackDiagnosticLog -FilterByResourceProvider eventhub is used to send diagnostic logs for Event Hubs.

To know more about Diagnostic log collection, please visit the below-given link:

The Send-AzureStackDiagnosticLog cmdlet is used to send diagnostic logs from Azure Stack Hub to the Microsoft Azure portal for analysis. This cmdlet can be used to send logs for various Azure Stack Hub services, including Event Hubs.

When using the Send logs now method to send diagnostic logs for Event Hubs, you can use the PowerShell command below:

Send-AzureStackDiagnosticLog -FilterByLogType eventhub

This cmdlet sends only the diagnostic logs related to Event Hubs. The FilterByLogType parameter is used to specify the log type to be sent.

The other parameters that are available with this cmdlet include:

  • FilterByNode: This parameter is used to specify the node for which the logs should be sent.
  • FilterByRole: This parameter is used to specify the role for which the logs should be sent.
  • FilterByResourceProvider: This parameter is used to specify the resource provider for which the logs should be sent.

In this scenario, the FilterByLogType parameter is the correct option as it will send the diagnostic logs related to Event Hubs only.