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
Connect-AzAccount
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