Hi @Sameer Bhat ,
Get-VM command will output a list of virtual machines and their current state to the Windows PowerShell console.
You can get the command from this Microsoft blog.
Get a List of Virtual Machines by Using PowerShell
https://devblogs.microsoft.com/scripting/get-a-list-of-virtual-machines-by-using-powershell/
--------
--If the reply is helpful, please Upvote and Accept it as an answer--