Editar

Set-HcsNetInterface

Sets the configuration for a single network interface by alias.

Syntax

Set-HcsNetInterface
   [-InterfaceAlias] <HcsNetInterfaces>
   [-Controller0IPv4Address <IPAddress>]
   [-Controller1IPv4Address <IPAddress>]
   [-IPv4Address <IPAddress>]
   [-IPv4Gateway <IPAddress>]
   [-IPv4Netmask <IPAddress>]
   [-IPv6Gateway <IPAddress>]
   [-IPv6Prefix <String>]
   [-IsCloudEnabled <Boolean>]
   [-IsiSCSIEnabled <Boolean>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-HcsNetInterface
   [-InterfaceAlias] <HcsNetInterfaces>
   [-ClearIPv4]
   [-ClearIPv6]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-HcsNetInterface cmdlet sets the configuration for a single network interface by alias. Controller-specific addresses, such as Controller0IPv4Address, apply only to Data0.

Examples

Example 1: Set the IPv4 configuration for a network interface

PS C:\> Set-HcsNetInterface Data2 -IPv4Address 10.1.1.30 -IPv4Gateway 10.1.1.1 -IPv4Netmask 192.168.255.0
InterfaceAlias         : Data2
Controller0IPv4Address :
Controller0IPv6Address :
Controller1IPv4Address :
Controller1IPv6Address :
IPv4Address            : 10.1.1.30
IPv4Gateway            : 10.1.1.1
IPv4Netmask            : 192.168.255.0
IPv6Address            :
IPv6Gateway            :
IPv6Prefix             :
IsEnabled              : True
IsCloudEnabled         : False
IsiSCSIEnabled         : False

This command sets the IPv4 configuration for the network interface specified by the InterfaceAlias parameter.

Example 2: Set the IPv6 gateway address

PS C:\> Set-HcsNetInterface Data2 -IPv6Prefix 2001:4898:4010:3015::/64 -IPv6Gateway 2001:4898:4010:3015::1


InterfaceAlias         : Data2
Controller0IPv4Address :
Controller0IPv6Address :
Controller1IPv4Address :
Controller1IPv6Address :
IPv4Address            : 10.1.1.30
IPv4Gateway            : 10.1.1.1
IPv4Netmask            : 192.168.255.0
IPv6Address            : 2001:4898:4010:3015:ff1a:afe8:bd14:5608
IPv6Gateway            : 2001:4898:4010:3015::1
IPv6Prefix             : 2001:4898:4010:3015::/64
IsEnabled              : True
IsCloudEnabled         : False
IsiSCSIEnabled         : False

This command sets the IPv6 gateway address for the network interface specified by the InterfaceAlias parameter. The IP address is automatically generated based on the IPv6Prefix parameter.

Example 3: Clear IPv6 settings for a network interface

PS C:\> Set-HcsNetInterface Data2 -ClearIPv6


InterfaceAlias         : Data2
Controller0IPv4Address :
Controller0IPv6Address :
Controller1IPv4Address :
Controller1IPv6Address :
IPv4Address            : 10.1.1.30
IPv4Gateway            : 10.1.1.1
IPv4Netmask            : 192.168.255.0
IPv6Address            :
IPv6Gateway            :
IPv6Prefix             :
IsEnabled              : True
IsCloudEnabled         : False
IsiSCSIEnabled         : False

This command removes IPv6 settings from the network interface specified by the InterfaceAlias parameter.

Example 4: Enable cloud access for a network interface

PS C:\> Set-HcsNetInterface Data2 -IsCloudEnabled $True


InterfaceAlias         : Data2
Controller0IPv4Address :
Controller0IPv6Address :
Controller1IPv4Address :
Controller1IPv6Address :
IPv4Address            : 10.1.1.30
IPv4Gateway            : 10.1.1.1
IPv4Netmask            : 192.168.255.0
IPv6Address            :
IPv6Gateway            :
IPv6Prefix             :
IsEnabled              : True
IsCloudEnabled         : True
IsiSCSIEnabled         : False

This command enables cloud access for the network interface specified by the InterfaceAlias parameter.

Example 5: Enable iSCSI access for a network interface

PS C:\> Set-HcsNetInterface Data2 -IsiSCSIEnabled $True


InterfaceAlias         : Data2
Controller0IPv4Address :
Controller0IPv6Address :
Controller1IPv4Address :
Controller1IPv6Address :
IPv4Address            : 10.1.1.30
IPv4Gateway            : 10.1.1.1
IPv4Netmask            : 192.168.255.0
IPv6Address            :
IPv6Gateway            :
IPv6Prefix             :
IsEnabled              : True
IsCloudEnabled         : True
IsiSCSIEnabled         : True

This command enables iSCSI access for the network interface specified by the InterfaceAlias parameter.

Parameters

-ClearIPv4

Indicates that the cmdlet removes all IPv4 addresses from a network interface. If the network interface is only configured for IPv4, this cmdlet also disables the interface.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ClearIPv6

Indicates that the cmdlet removes all IPv6 addresses from a network interface. If the network interface is only configured for IPv6, this cmdlet also disables the interface.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Controller0IPv4Address

Specifies an IP address to directly target controller0. You can configure only the Data0 network interface with a fixed IP address for controller0. The Controller0IPv4 setting is ignored on all interfaces other than Data0.

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Controller1IPv4Address

Specifies an IP address to directly target controller1. You can configure only the Data0 network interface with a fixed IP address for controller1. The Controller1IPv4 setting is ignored on all interfaces other than Data0.

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InterfaceAlias

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

  • Data0
  • Data1
  • Data2
  • Data3
  • Data4
  • Data5
Type:HcsNetInterfaces
Accepted values:Data0, Data1, Data2, Data3, Data4, Data5
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IPv4Address

Specifies an IPv4 address.

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IPv4Gateway

Specifies an IPv4 default gateway.

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IPv4Netmask

Specifies the IPv4 prefix length in bits. This field also accepts subnet format (for example, 255.255.255.0)

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IPv6Gateway

Specifies an IPv6 default gateway.

Type:IPAddress
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IPv6Prefix

Specifies an IPv6 prefix. When you specify this parameter, the cmdlet automatically generates an IPv6 address based on the prefix, ensures it does not have an IP conflict on the network, and sets that IPv6 address.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IsCloudEnabled

Indicates whether cloud access is enabled on an interface. If you enable cloud access, you can use an interface to send data to the cloud and communicate with the azure_1 StorSimple Manager Service. Data0 must always be cloud-enabled.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IsiSCSIEnabled

Indicates whether iSCSI access is enabled on an interface.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

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