How to check Azure Migrate Discovered Server Using Powershell Commands or Script

Ijtehad Farooqui 1 Reputation point

Hi @SadiqhAhmed-MSFT \ @Prrudram-MSFT
How to Get the discovered server (Azure Migration Tools) details using powershell commands with all details


Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
758 questions
Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
679 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 23,131 Reputation points

    Hello @Ijtehad Farooqui ,

    Thank you for reaching out to the Microsoft Q&A platform.

    As far as I know, the PowerShell support is available only for agentless method of migrating VMware virtual machines to Azure. See the tutorial on migrating VMware virtual machines to Azure through Azure PowerShell to learn more.

    Here are the steps for the same:

    1.Install Azure Migrate PowerShell module

    2.Select your Azure subscription
    Set-AzContext -SubscriptionId 00000000-0000-0000-0000-000000000000

    3.Retrieve the Azure Migrate project

    Get resource group of the Azure Migrate project
    $ResourceGroup = Get-AzResourceGroup -Name MyResourceGroup

    Get details of the Azure Migrate project
    $MigrateProject = Get-AzMigrateProject -Name MyMigrateProject -ResourceGroupName $ResourceGroup.ResourceGroupName

    View Azure Migrate project details
    Write-Output $MigrateProject

    4.Retrieve discovered VMs in an Azure Migrate project

    Get a specific VMware VM in an Azure Migrate project
    $DiscoveredServer = Get-AzMigrateDiscoveredServer -ProjectName $MigrateProject.Name -ResourceGroupName $ResourceGroup.ResourceGroupName -DisplayName MyTestVM | Format-Table DisplayName, Name, Type

    View discovered server details
    Write-Output $DiscoveredServer

    You could refer to the following document for details on the PowerShell support for Azure Migrate

    Hope this helps!

    Please "Accept as Answer" and Upvote if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues