Add-NetIntent
Configures network host using intent based tags for adapters
Syntax
Add-NetIntent
[[-ComputerName] <String>]
-AdapterName <String[]>
-Name <String>
[-Wait]
[-Compute]
[-Management]
[-Storage]
[-Switchless]
[-Stretch]
[-AdapterPropertyOverrides <NetAdapterAdvancedConfiguration>]
[-QoSPolicyOverrides <QoSPolicy>]
[-AdapterRssPropertyOverrides <RssConfiguration>]
[-SwitchPropertyOverrides <SwitchConfigurationOverride>]
[-StorageOverrides <NetAdapterStorageOverride>]
[-SiteOverrides <SiteConfiguration[]>]
[-StorageVlans <Int32[]>]
[-ManagementVlan <Int32>]
[-SkipNetworkInterfaceValidation]
[-PutGlobal <Boolean>]
[<CommonParameters>]
Add-NetIntent
[[-ComputerName] <String>]
[-ClusterName <String>]
[-Wait]
[-GlobalProxyOverrides <WinHttpAdvProxy>]
[-GlobalClusterOverrides <ClusterSettings>]
[<CommonParameters>]
Add-NetIntent
-ClusterName <String>
-AdapterName <String[]>
-Name <String>
[-Wait]
[-Compute]
[-Management]
[-Storage]
[-Switchless]
[-Stretch]
[-AdapterPropertyOverrides <NetAdapterAdvancedConfiguration>]
[-QoSPolicyOverrides <QoSPolicy>]
[-AdapterRssPropertyOverrides <RssConfiguration>]
[-SwitchPropertyOverrides <SwitchConfigurationOverride>]
[-StorageOverrides <NetAdapterStorageOverride>]
[-SiteOverrides <SiteConfiguration[]>]
[-StorageVlans <Int32[]>]
[-ManagementVlan <Int32>]
[-SkipNetworkInterfaceValidation]
[-PutGlobal <Boolean>]
[<CommonParameters>]
Description
Add-NetIntent
is used to communicate the default networking configurations required on the host.
Each intent is uniquely identified by the list of physical adapters provided. Which means no two
intents can have overlapping physical nic names.
Intents are supported per cluster or as a standalone host.
- For Standalone ComputerName should point to the available DNS host Name. (Ensure that the current used of the script has administrator priviliges on the remote machine)
- For Cluster: ClusterName should point to the available DNS ClusterName. Cluster intents are policies which 'floats' across the cluster and any node which finds compatible (matching names ) will automatically apply the intended networking configuration on it.
- If ComputerName and ClusterName are null, clustered hosts will use the name of their cluster and standalone hosts will use their own host name.
If you're logged into using a remote session, giving a remote cluster name would very likely result in a 'double hop issue'. For more information, see Understanding Kerberos Double Hop
Cluster DNS name is 'floating' and may be actively registered to any of the node's IP address. If the active IP does not belong to the node this script is being run, then a remote call will be made. In a remote session, this is a double hop and will fail.
As an alternative, you can try giving -ClusterName <localhostname>
as the target endpoint. This
will cause the resolution to be forced to the local instance of the cluster. This is different from
calling -ComputerName <localhostname>
, calling with -ComputerName updates only the local reposity.
Intents in the local repositories are skipped if the ndoe is a part of a cluster.
Once an intent is created, it may not be modified. The only way to re-do is to do a cleanup using
Clear-NetIntent
and then applying Add-NetIntent
again.
However, configuration changes like providing override for defaults is possible. This can be
achieved by providing policy overrides (see AdapterPropertyOverrides, QoSPolicyOverrides,
AdapterRssOverrides, and SwitchOverrides). These can also be supplied during Add-NetIntent
and can also be applied post facto using Add-NetIntentOverride
.
Set-NetIntentTracing
can be used to enable / disable tracing for collecting dignostic information
about operations of NetworkAtc
Intent status is retried a few times and then the engine gives up. This would be marked as
Failed. You can query the status by running Get-NetIntentStatus
.
Examples
EXAMPLE 1
Add-NetIntent
Parameters
-AdapterName
A list of physical network adapters on which this intent will be created. If an intent requires switch creation, one switch will be created. If a switch is created with multiple adapters, a NIC teaming will be automatically be created.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AdapterPropertyOverrides
{{ Fill AdapterPropertyOverrides Description }}
Type: | FabricManager.NetAdapterAdvancedConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AdapterRssPropertyOverrides
{{ Fill AdapterRssPropertyOverrides Description }}
Type: | FabricManager.RssConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterName
The name of the target cluster for the intents.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Compute
Specifies the intent is for compute.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ComputerName
The name of the target computer for the intents.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GlobalClusterOverrides
{{ Fill GlobalClusterOverrides Description }}
Type: | FabricManager.ClusterSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GlobalProxyOverrides
{{ Fill GlobalProxyOverrides Description }}
Type: | FabricManager.WinHttpAdvProxy |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Management
Specifies the intent is for management.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManagementVlan
{{ Fill ManagementVlan Description }}
Type: | Int32 |
Position: | Named |
Default value: | -1 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The name of the intent.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PutGlobal
{{ Fill PutGlobal Description }}
Type: | Boolean |
Position: | Named |
Default value: | True |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-QoSPolicyOverrides
{{ Fill QoSPolicyOverrides Description }}
Type: | FabricManager.QoSPolicy |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SiteOverrides
{{ Fill SiteOverrides Description }}
Type: | FabricManager.SiteConfiguration[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkipNetworkInterfaceValidation
{{ Fill SkipNetworkInterfaceValidation Description }}
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Storage
Specifies the intent is for storage.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageOverrides
{{ Fill StorageOverrides Description }}
Type: | FabricManager.NetAdapterStorageOverride |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageVlans
{{ Fill StorageVlans Description }}
Type: | Int32[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Stretch
{{ Fill Stretch Description }}
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Switchless
{{ Fill Switchless Description }}
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SwitchPropertyOverrides
{{ Fill SwitchPropertyOverrides Description }}
Type: | FabricManager.SwitchConfigurationOverride |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Wait
{{ Fill Wait Description }}
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |