Hi Kimberly,
there is no need for the foreach loop because the script will be executed by the engine at each node/switch.
Best Regards,
Sascha
/*
.CHANGE_TEMPLATE_DESCRIPTION
This will change the default local account and password in the event taCACS is down and we need to login to the device locally. Kim Viik and Robert Logan 12/12/2014
.CHANGE_TEMPLATE_TAGS
SRX, JUNOS, JUNIPER, Password_Change
.PLATFORM_DESCRIPTION
Juniper Devices.
.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 @NewPassword
The new enable password.
.PARAMETER_DESCRIPTION @NewPassword
This should be a valid Juniper Junos password.No spaces are allowed, a script will not be generated for a password including a space.
*/
script ChangePassword (
NCM.Nodes @ContextNode,
string @NewPassword )
{
if (@NewPassword contains ' ')
{}
else
{
CLI
{
Configure
set system login user neteng authentication plain-text-password
@NewPassword
@NewPassword
set system login user 5upp0rt authentication plain-text-password
@NewPassword
@NewPassword
commit and-quit
exit
}
}
}