I am new here, new to the site and new to NCM, not new to NPM. I am tasked with download the running configuration of the voice mail modules for our Business Service Centers. They are using 3945 with the CUCME system running on them. I would like to differentiate the locations by site name. I would like to use the hostname for the Destination file name (@DestFile) but, I do not know how to configure the script to use the hostname as a variable. Here is the script so far. Some assistance would be greatly appreciated. I may have this whole thing wrong.......
/*
.CHANGE_TEMPLATE_DESCRIPTION
This Script downloads the Voice Mail Modules for the BSC 3945 Cisco Routers.
.PLATFORM_DESCRIPTION
This script is for Cisco 3945 IOS based routers only.
.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 @ServiceModule
This is the slot and port of the service module.
.PARAMETER_DESCRIPTION @ServiceModule
This is the slot and port of the service module.
.PARAMETER_LABEL @username
This is the username used to log into the VM.
.PARAMETER_DESCRIPTION @username
This is the username used to log into the VM.
.PARAMETER_LABEL @password
This is the password used to log into the VM.
.PARAMETER_DESCRIPTION @password
This is the password used to log into the VM.
.PARAMETER_LABEL @TFTPServer
This is te destination server.
.PARAMETER_LABEL @TFTPServer
This is the destination server
.PARAMETER_LABEL @DestFile
This will be the destination file
.PARAMETER_LABEL @DestFile
This will be the destination file.
*/
script DownLoading_VM_To_TFTP_Server(
NCM.Nodes @ContextNode,
string @ServiceModule,
string @username,
string @password,
string @TFTPServer,
string @DestFile )
{
//This will backup the VM Modules to te TFTP server
CLI
{
service-module @ServiceModule session
@username
@password
copy running-config tftp
@TFTPServer
@DestFile
exit
exit
}