Disable-HcsNetInterface
Disable-HcsNetInterface
Disables a network interface.
語法
Parameter Set: Default
Disable-HcsNetInterface [-InterfaceAlias] <HcsDisableNetInterfaces> [ <CommonParameters>]
詳細描述
The Disable-HcsNetInterface cmdlet disables a network interface. If you disable a network interface and then enable it, the IP address settings stay in place.
Note that you cannot disable the Data0 interface.
參數
-InterfaceAlias<HcsDisableNetInterfaces>
Specifies an interface alias. 此參數接受的值包括:
-- Data1
-- Data2
-- Data3
-- Data4
-- Data5
別名 |
無 |
必要? |
true |
位置? |
2 |
預設值 |
無 |
接受管線輸入? |
false |
接受萬用字元? |
false |
<CommonParameters>
此 Cmdlet 支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 與 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
輸入
輸入類型是您可以使用管線處理方式傳遞給 Cmdlet 的物件類型。
輸出
輸出類型是 Cmdlet 所發出的物件類型。
Microsoft.HCS.Management.Platform.Support.NetInterfaceInfo
The NetInterfaceInfo object has the following properties:
-- HcsNetInterfaces InterfaceAlias (Data0, Data1, Data2, Data3, Data4, or Data5)
-- IPAddress Controller 0 IPv4Address
-- IPAddress Controller 0 IPv6Address
-- IPAddress Controller 1 IPv4Address
-- IPAddress Controller 1 IPv6Address
-- IPAddress IPv4Address
-- IPAddress IPv4Gateway
-- IPAddress IPv4Netmask
-- IPAddress IPv6Address
-- IPAddress IPv6Gateway
-- String IPv6Prefix
-- IsEnabled
-- IsCloudEnabled
-- IsiSCSIEnabled
範例
Example 1: Disable a network interface
This command specifies the InterfaceAlias parameter to disable the Data2 network interface.
PS C:\> Disable-HcsNetInterface Data2