Cannot bind parameter 'ProcessServer'. Cannot convert the "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" value of type "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" to type "Micr

Itamar Safri 0 Reputation points
2024-12-23T12:58:56.5433333+00:00

Hi,

Following this article:

https://learn.microsoft.com/en-us/azure/site-recovery/vmware-azure-disaster-recovery-powershell

I'm trying to enable replication on a vmware VM.

I got the process server from the fabric, as stated in the article:

$fabricObj.FabricSpecificDetails.ProcessServers[0]

But I get the following error when trying to enable the replication:

New-AzRecoveryServicesAsrReplicationProtectedItem : Cannot bind parameter 'ProcessServer'. Cannot convert the

"Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" value of type "Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServerDetails" to type

"Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServer".

I cannot find a way to get Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRProcessServer.

Any ideas?

Also, I cant see in my fabric the RunAsAccount

Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
739 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pavan Minukuri 915 Reputation points Microsoft Vendor
    2024-12-25T01:56:00.38+00:00

    Hi Itamar Safri
    Welcome to Microsoft Q&A, Thanks for asking question here...!
    To enable the replication on a VMware VM using Azure PowerShell, please follow with the below steps:
    1.Use this command to get the list of process servers:

    $processServers = Get-AzRecoveryServicesAsrFabric | Where-Object { $_.FabricType -eq "VMware" } | Select-Object -ExpandProperty FabricSpecificDetails | Select-Object -ExpandProperty ProcessServers
    
    

    2.Pick a process server from the list:

    $selectedProcessServer = $processServers[0]  # Choose the appropriate index
    
    

    3.When creating a replication item, use the selected process server:

    New-AzRecoveryServicesAsrReplicationProtectedItem -ResourceGroupName "<YourResourceGroup>" -VaultName "<YourVaultName>" -ProtectionContainer "<YourContainer>" -ProtectableItem "<YourItem>" -ProcessServer $selectedProcessServer
    
    

    Fixing the RunAs Account Issue
    4.Make sure the ASR appliance is correctly registered in the Azure portal.
    5.See available RunAs accounts, use:

    $runAsAccounts = Get-AzRecoveryServicesAsrFabric | Select-Object -ExpandProperty FabricSpecificDetails | Select-Object -ExpandProperty RunAsAccounts
    
    

    7.If no accounts are listed, create one through the Azure portal or PowerShell.

    Reference Document : https://stackoverflow.com/questions/78118001/azure-site-recovery-vmware-to-azure-a-few-issues, https://docs.azure.cn/en-us/migrate/tutorial-migrate-vmware-powershell

    Please let is know if required anything.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.