Get-SCLogicalNetwork
获取逻辑网络对象。
语法
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
[-All]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
-VMHost <Host>
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
-Cloud <Cloud>
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
-VMHostGroup <HostGroup>
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
[-ID <Guid>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
-CloudRootHostGroup <HostGroup[]>
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCLogicalNetwork
[-VMMServer <ServerConnection>]
[[-Name] <String>]
-CloudRootVMwareResourcePool <VmwResourcePool>
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
说明
Get-SCLogicalNetwork cmdlet 检索一个或多个 Virtual Machine Manager (VMM) 逻辑网络对象。
示例
示例 1:检索指定主机组的所有可用逻辑网络
PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup01" }
PS C:\> Get-SCLogicalNetwork -VMHostGroup $HostGroup
第一个命令获取路径“所有 Hosts\HostGroup01”的主机组对象,并将对象存储在$HostGroup变量中。
第二个命令获取存储在$HostGroup中的主机组的所有逻辑网络,并向用户显示有关每个逻辑网络的信息。
参数
-All
指示此 cmdlet 获取与父对象无关的所有从属对象。
例如,该命令 Get-SCVirtualDiskDrive -All
获取所有虚拟磁盘驱动器对象,而不考虑每个虚拟磁盘驱动器对象关联的虚拟机对象或模板对象。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Cloud
指定私有云对象。
Type: | Cloud |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CloudRootHostGroup
指定在私有云的根级别定义的主机组。
Type: | HostGroup[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CloudRootVMwareResourcePool
指定在私有云的根级别定义的 VMware 资源池。
Type: | VmwResourcePool |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ID
将数字标识符指定为特定对象的全局唯一标识符或 GUID。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 对象的名称。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
指定用户名。 此 cmdlet 代表此参数指定的用户运行。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
指定用户角色。 若要获取用户角色,请使用 Get-SCUserRole cmdlet。 此 cmdlet 代表此参数指定的用户角色运行。
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHost
指定虚拟机主机对象的数组。
Type: | Host |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHostGroup
指定一个虚拟主机组对象。
Type: | HostGroup |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
指定VMM 服务器对象。
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
LogicalNetwork
此 cmdlet 返回 LogicalNetwork 对象。