Monitoring Azure RecoveryServices (Windows Server Backups to Azure using MARS)

%3CLINGO-SUB%20id%3D%22lingo-sub-820587%22%20slang%3D%22en-US%22%3EMonitoring%20Azure%20RecoveryServices%20(Windows%20Server%20Backups%20to%20Azure%20using%20MARS)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-820587%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20using%20the%20MARS%20agent%20to%20backup%20on-premise%20Windows%20servers%20to%20Azure%20Recovery%20Services.%3C%2FP%3E%3CP%3ENow%20I'm%20trying%20to%20check%20for%20backup%20statuses%2C%20using%20PowerShell%205.1%20and%20the%20Az%202.5.0%20PowerShell%20Module.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23%20authentication%20is%20handled%20before%0A%24vault%20%3D%20Get-AzRecoveryServicesVault%20-Name%20%22BackupVault1%22%0A%24Containers%20%3D%20Get-AzRecoveryServicesBackupContainer%20-ContainerType%20Windows%20-BackupManagementType%20MARS%20-VaultId%20%24vault.ID%0Aforeach(%24Container%20in%20%24Containers)%20%7B%0A%20%20%20%20Get-AzRecoveryServicesBackupItem%20-VaultId%20%24vault.ID%20-Container%20%24Container%20-WorkloadType%20WindowsServer%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BApparently%20the%20WorkLoadType%20%22WindowsServer%22%20does%20not%20exists%2C%20but%20all%20the%20others%20that%20should%20be%20valid%20(AzureVM%2C%20AzureSQLDatabase%2C%20AzureFiles%2C%20MSSQL)%20are%20not%20working%20either.%20I%20got%20that%20WorkLoadType%20from%20the%20PowerShell%20module%2C%20eventhough%20it%20doesn't%20exist%20in%20the%20documentation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128247iE4B4B92D0A7A201D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-08-23%2020_14_52-Windows%20PowerShell%20ISE.png%22%20title%3D%222019-08-23%2020_14_52-Windows%20PowerShell%20ISE.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-820587%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EProtection%20%26amp%3B%20Recovery%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Contributor

Hello,

I'm using the MARS agent to backup on-premise Windows servers to Azure Recovery Services.

Now I'm trying to check for backup statuses, using PowerShell 5.1 and the Az 2.5.0 PowerShell Module. 

 

 

# authentication is handled before
$vault = Get-AzRecoveryServicesVault -Name "BackupVault1"
$Containers = Get-AzRecoveryServicesBackupContainer -ContainerType Windows -BackupManagementType MARS -VaultId $vault.ID
foreach($Container in $Containers) {
    Get-AzRecoveryServicesBackupItem -VaultId $vault.ID -Container $Container -WorkloadType WindowsServer
}

 

 Apparently the WorkLoadType "WindowsServer" does not exists, but all the others that should be valid (AzureVM, AzureSQLDatabase, AzureFiles, MSSQL) are not working either. I got that WorkLoadType from the PowerShell module, eventhough it doesn't exist in the documentation.

 

Any ideas? 

 

2019-08-23 20_14_52-Windows PowerShell ISE.png

0 Replies