I have created the script but it does not seem to work/ get past the interface selection when I add loop through the interfaces.
once I have this working I would like to default the interface and add more config to the interface
/*
.CHANGE_TEMPLATE_DESCRIPTION
Configure Cisco IOS XE Interfaces with VC and advanced settings
.CHANGE_TEMPLATE_TAGS
Cisco, Interface, VC, Authentication, Monitoring
.PARAMETER_LABEL @ContextNode
NCM Node
.PARAMETER_LABEL @TargetPorts
Select Port(s)
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on.
.PARAMETER_LABEL @PhysicalInterfaces
Select Interface(s)
.PARAMETER_DESCRIPTION @TargetPorts
Select Interface(s) you would like to configure.
.PLATFORM_DESCRIPTION
Cisco IOS XE
*/
script ConfigureAccessInterfaces (
NCM.Nodes @ContextNode,
NCM.Interfaces[] @TargetPorts
)
{
{
// Enter configuration mode
CLI
{
configure terminal
}
// Loop through selected ports
foreach (@portItem in @TargetPorts)
{
CLI
{
interface @portItem.InterfaceDescription
description what ever you like
no shutdown
exit
}
}
}
}