< Back

Get-AzureRmRecoveryServicesAsrEvent

Tue Jan 29, 2019 10:02 pm

NAME Get-AzureRmRecoveryServicesAsrEvent



SYNOPSIS

Gets details of Azure Site Recovery events in the vault.





SYNTAX

Get-AzureRmRecoveryServicesAsrEvent [-AffectedObjectFriendlyName <String>] [-DefaultProfile <IAzureContextContainer>] [-EndTime <DateTime>]

[-EventType {VmHealth | ServerHealth | AgentHealth}] [-Fabric <ASRFabric>] [-Severity {Critical | Warning | OK | Unknown}] [-StartTime <DateTime>]

[<CommonParameters>]



Get-AzureRmRecoveryServicesAsrEvent [-AffectedObjectFriendlyName <String>] [-DefaultProfile <IAzureContextContainer>] [-EndTime <DateTime>]

[-EventType {VmHealth | ServerHealth | AgentHealth}] -FabricId <String> [-Severity {Critical | Warning | OK | Unknown}] [-StartTime <DateTime>]

[<CommonParameters>]



Get-AzureRmRecoveryServicesAsrEvent [-DefaultProfile <IAzureContextContainer>] -Name <String> [<CommonParameters>]



Get-AzureRmRecoveryServicesAsrEvent [-DefaultProfile <IAzureContextContainer>] -ResourceId <String> [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-AffectedObjectFriendlyName <String>

Specifies AffectedObject FriendlyName for the search.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EndTime <DateTime>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-EventType <String>

Filter events by the event type.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Fabric <ASRFabric>

Filter events by the specified fabric.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FabricId <String>

Specifies the fabricId to filter.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies name of the event for search.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceId <String>

Specifes the event ReourceId of event.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Severity <String>

Event severity to filter on.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StartTime <DateTime>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRFabric







OUTPUTS

System.Collections.Generic.IEnumerable`1[[Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASREvent,

Microsoft.Azure.Commands.RecoveryServices.SiteRecovery, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]







NOTES









Example 1



PS C:\\> Get-AzureRmRecoveryServicesAsrEvent



List of all events.





Example 2



PS C:\\> Get-AzureRmRecoveryServicesAsrEvent -EventName "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/xxxxxxxxxxx

xxxxx/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



PS C:\\> Get-AzureRmRecoveryServicesAsrEvent -AffectedObjectName xxxxxxxxxxxxx



List of event for affected Object.





Example 4



PS C:\\> Get-AzureRmRecoveryServicesAsrEvent -AffectedObjectName 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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... esasrevent