New-SCVMNetwork
建立虛擬機器網路。
Syntax
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-Owner <String>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
-IsolationType <VMNetworkType>
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-Owner <String>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-AutoCreateSubnet]
[-Owner <String>]
[-NetworkManager <VirtualSwitchExtensionManager>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
-ExternalName <String>
[-Owner <String>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
New-SCVMNetwork
[-UserRole <UserRole>]
[-VMMServer <ServerConnection>]
[-Name] <String>
[[-Description] <String>]
-LogicalNetwork <LogicalNetwork>
[-RoutingDomainId <Guid>]
[-PAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-CAIPAddressPoolType <VMNetworkIPAddressPoolType>]
[-ExternalVMNetwork]
[-Owner <String>]
[-NetworkManager <VirtualSwitchExtensionManager>]
[-PortACL <PortACL>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Description
New-SCVMNetwork Cmdlet 會建立虛擬機器網路。 虛擬機器網路支援多種隔離方法:無隔離、網路虛擬化、外部和 VLAN。 VM 網路所使用的隔離類型取決於指定的邏輯網路。 Virtual Machine Manager (VMM) 會使用與虛擬機器網路相關聯的 IP 位址池,將客戶位址指派給虛擬機器。
虛擬機器可以看到客戶位址,並由客戶用來與虛擬機器通訊。
建立虛擬機器網路時,您必須提供邏輯網路物件。 若要取得邏輯網路物件,請使用 Get-SCLogicalNetwork Cmdlet。
範例
範例 1:建立虛擬機器網路
PS C:\> $LogNet = Get-SCLogicalNetwork -Name "LogicalNetwork01"
PS C:\> New-SCVMNetwork -Name "VMNetwork01" -LogicalNetwork $LogNet
第一個命令會取得名為 LogicalNetwork01 的邏輯網路物件,並將物件儲存在$LogNet變數中。
第二個命令會使用邏輯網路 LogicalNetwork01 建立名為 VMNetwork01 的 VM 網路。
參數
-AutoCreateSubnet
表示會自動建立子網。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CAIPAddressPoolType
指定位址集區類型。 有效值為:IPV4、IPV6。
Type: | VMNetworkIPAddressPoolType |
Accepted values: | IPV4, IPV6 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
指定虛擬機器網路的描述。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExternalName
指定物件的外部名稱。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExternalVMNetwork
表示虛擬機器網路是外部的。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsolationType
指定虛擬機器網路的隔離類型。 此參數可接受的值為:
- NoIsolation
- WindowsNetworkVirtualization
- 外部
- VLANNetwork
Type: | VMNetworkType |
Accepted values: | NoIsolation, WindowsNetworkVirtualization, External, VLANNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定追蹤工作進度,並將工作進度存放在這個參數命名的變數中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogicalNetwork
指定邏輯網路。 邏輯網路是 IP 子網和 VLAN 的具名群組,可用來組織及簡化網路指派。
Type: | LogicalNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 物件的名稱。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkManager
指定虛擬交換器擴充管理員。
Type: | VirtualSwitchExtensionManager |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-Owner
以有效網域使用者帳戶的格式指定 VMM 物件的擁有者。
- 範例格式:
-Owner "Contoso\PattiFuller"
- 範例格式:
-Owner "PattiFuller@Contoso"
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PAIPAddressPoolType
指定位址集區類型。 有效值為:IPV4、IPV6。
Type: | VMNetworkIPAddressPoolType |
Accepted values: | IPV4, IPV6 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PortACL
指定埠 ACL 物件。
Type: | PortACL |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定觸發此動作 (PRO 提示) 效能和資源優化提示的識別碼。 此參數可讓您稽核 PRO 秘訣。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RoutingDomainId
以 GUID 的形式指定路由網域的識別碼。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
表示作業會以非同步方式執行,讓控制項立即返回命令殼層。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserRole
指定使用者角色物件。
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
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 |