Unable to extract VirtualNetwork Name using SCVMM powershell modules

后端 未结 1 1687
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-23 17:02

Im trying to extract virtual network information for a VM using powershell, i tried using regular expression but for VM\'s with more than 1 NIC im unable to see output

B

相关标签:
1条回答
  • 2021-01-23 17:17

    Try this:

    Get-VM sql.IAN01.Host | Select-Object @{Name="VMName";Expression={$_.name}},@{Name='VirtualNetwork';e={$_.VirtualNetworkAdapters | Foreach-Object{$_.VirtualNetwork}}}
    
    0 讨论(0)
提交回复
热议问题