Get-AzureRmRecoveryServicesAsrEvent
Gets details of Azure Site Recovery events in the vault.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmRecoveryServicesAsrEvent
[-AffectedObjectFriendlyName <String>]
[-Fabric <ASRFabric>]
[-Severity <String>]
[-StartTime <DateTime>]
[-EndTime <DateTime>]
[-EventType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesAsrEvent
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesAsrEvent
-FabricId <String>
[-AffectedObjectFriendlyName <String>]
[-Severity <String>]
[-StartTime <DateTime>]
[-EndTime <DateTime>]
[-EventType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmRecoveryServicesAsrEvent
-Name <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmRecoveryServicesAsrEvent gets the list of events in the vault based on the specified selection filters.
Examples
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/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
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.
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: | 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
Specifes the event ReourceId 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
Outputs
IEnumerable<T>[[Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASREvent, Microsoft.Azure.Commands.RecoveryServices.SiteRecovery, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]