編集

次の方法で共有


Get-AzRecoveryServicesAsrEvent

Gets details of Azure Site Recovery events in the vault.

Syntax

Get-AzRecoveryServicesAsrEvent
   [-AffectedObjectFriendlyName <String>]
   [-Fabric <ASRFabric>]
   [-Severity <String>]
   [-StartTime <DateTime>]
   [-EndTime <DateTime>]
   [-EventType <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesAsrEvent
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesAsrEvent
   -FabricId <String>
   [-AffectedObjectFriendlyName <String>]
   [-Severity <String>]
   [-StartTime <DateTime>]
   [-EndTime <DateTime>]
   [-EventType <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzRecoveryServicesAsrEvent
   -Name <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzRecoveryServicesAsrEvent gets the list of events in the vault based on the specified selection filters.

Examples

Example 1

Get-AzRecoveryServicesAsrEvent

List of all events.

Example 2

Get-AzRecoveryServicesAsrEvent -Name "VmMonitoringEvent;9091897569816476200_84576304-bafc-4714-8ba6-197a5d09d84f"

AffectedObjectFriendlyName   : V2A-W2K12-400
Description                  : Virtual machine health is in Critical state.
EventCode                    : SRSVMHealthChanged
EventSpecificDetails         :
EventType                    : AgentHealth
FabricId                     : /Subscriptions/xxxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxx/providers/Microsoft.RecoveryServices/vaults/xxxxxxxxxxxxxxxx/replicationFabrics/xxxxxxxxxxxx
HealthErrors                 : {}
Name                         : VmMonitoringEvent;9091897569816476200_84576304-bafc-4714-8ba6-197a5d09d84f
ProviderSpecificEventDetails : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRInMageAzureV2EventDetails
Severity                     : Critical
TimeOfOccurence              : 8/17/2017 12:31:43 PM

Get event by name.

Example 3

Get-AzRecoveryServicesAsrEvent -AffectedObjectFriendlyName xxxxxxxxxxxxx

List of event for affected Object.

Example 4

Get-AzRecoveryServicesAsrEvent -AffectedObjectFriendlyName xxxxxxxxxxxx -StartTime "8/17/2017 12:31:40 PM" -EndTime "8/17/2017 12:31:44 PM" -Severity Critical -EventType VmHealth

List of event between time start time and end time , severity critical and health type VmHealth.

Parameters

-AffectedObjectFriendlyName

Specifies AffectedObject FriendlyName for the search.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EndTime

Specifies the end time of the search window. Use this parameter to get only those events that have occurred before the specified time.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EventType

Filter events by the event type.

Type:String
Accepted values:VmHealth, ServerHealth, AgentHealth
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Fabric

Filter events by the specified fabric.

Type:ASRFabric
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FabricId

Specifies the fabricId to filter.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies name of the event for search.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

Specifies the event ResourceId of event.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Severity

Event severity to filter on.

Type:String
Accepted values:Critical, Warning, OK, Unknown
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StartTime

Specifies the start time of the search window. Use this parameter to get only those events that have occurred after the specified time.

Type:DateTime
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

ASREvent