Hi all,
Anyone please assist me to create a configuration template for configuring hostname in cisco switches. When the template runs it will ask for the hostname and the user need to input the name.
Regards,
Ejaz Ahmed
Hi,
its only a little modification of the Base-Template.
Best Regards,
Sascha
/*
.CHANGE_TEMPLATE_DESCRIPTION
Change the hostname of a switch.
.PLATFORM_DESCRIPTION
All nodes with renaming via configure terminal -> hostname NewName
.PARAMETER_LABEL @ContextNode
NCM Node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
.PARAMETER_LABEL @NewName
Give the variable an appropriate label here.
.PARAMETER_DESCRIPTION @NewName
The new name of the node
*/
script BaseChangeTemplate(
NCM.Nodes @ContextNode,
string @NewName )
{
//Enter CLI commands
CLI
configure terminal
//Modify this line if renaming is done with a different command
hostname @NewName
}
Thank you so much. It helped me a lot.
Ejaz