Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 如何从SCVMM 2008 R2获取IP地址_Powershell_Ip_Windows Server 2008 R2_Hyper V - Fatal编程技术网

Powershell 如何从SCVMM 2008 R2获取IP地址

Powershell 如何从SCVMM 2008 R2获取IP地址,powershell,ip,windows-server-2008-r2,hyper-v,Powershell,Ip,Windows Server 2008 R2,Hyper V,我使用PowerShell和以下库从Hyper-V 2008 R2单机版获取IP地址: 是否可以使用Windows PowerShell Virtual Machine Manager从SCVMM 2008 R2获取IP地址? 存在一个与SCVMM 2008 R2中的pshyperv.codeplex.com类似的库?不知道这是否适用于Hyper-V 2008R2,但它适用于2012R2 首次运行: Import-Module virtualmachinemanager 您可以尝试以下两种方法

我使用PowerShell和以下库从Hyper-V 2008 R2单机版获取IP地址:

是否可以使用Windows PowerShell Virtual Machine Manager从SCVMM 2008 R2获取IP地址?
存在一个与SCVMM 2008 R2中的pshyperv.codeplex.com类似的库?

不知道这是否适用于Hyper-V 2008R2,但它适用于2012R2

首次运行:

Import-Module virtualmachinemanager
您可以尝试以下两种方法之一:

Get-VM  | Get-VirtualNetworkAdapter | select name,ipv4addresses
或:

Get-SCVirtualMachine | Get-SCVirtualNetworkAdapter | select name,ipv4Addresses