Disable-HcsNetInterface

Disable-HcsNetInterface

Disables a network interface.

Syntax

Parameter Set: Default
Disable-HcsNetInterface [-InterfaceAlias] <HcsDisableNetInterfaces> {Data1 | Data2 | Data3 | Data4 | Data5} [ <CommonParameters>]

Detailed Description

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.

Parameters

-InterfaceAlias<HcsDisableNetInterfaces>

Specifies an interface alias. The acceptable values for this parameter are:

-- Data1
-- Data2
-- Data3
-- Data4
-- Data5

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • 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

Examples

Example 1: Disable a network interface

This command specifies the InterfaceAlias parameter to disable the Data2 network interface.

PS C:\> Disable-HcsNetInterface Data2

Get-HcsNetInterface

Enable-HcsNetInterface

Set-HcsNetInterface