Have those configs in your database and filesystem?  Want to copy them elsewhere securely via Windows Task Scheduler?

Version 7

    My solution uses PKI and putty utility pscp.exe so that I can securely copy configs for the day from the filesystem to a server for archiving.  As my configs hit the filesystem with filenames ending in Running.Config, the argument I use searches for files with that in the name.  Also requires a timestamp of the current date (the '/d 0' part below).

    Create a Windows scheduled task with action:


    Start a program

    Program / script: C:\Windows\System32\cmd.exe

    Add arguments: forfiles /p D:\SolarWinds\Config-Archive\ /s /m *Running.Config* /d 0 /c "cmd /c D:\Putty\Pscp.exe -i D:\Putty yourcertname.ppk @path username@destinationserver/where/ever/you/want/"

    Start in:  D:\SolarWinds\Config-Archive\


    The target server's certificate will need to be already cached by the SolarWinds server for the service account running the job.  This can be done via psexec, via the registry, or (the easiest way) prepend the pscp command with 'echo y |' to accept the cert that the target server will prompt for acceptance (only needed for first run...then remove 'echo y|').


    Update:  I have since rewritten my solution so that a date string variable is created based on current date.  My script removes the 0 for single digit months (Jan - Sep) so that the format NCM saves configs in is the same as the format expected by my Windows 2008 server uses by default for its date format.  Someone before me had already done the heavy lifting with a few for statements to get an integer for month and for date.  I couldn't find a way to get NCM to save the files with the date in a format used by the OS so my revised script does it.  Script changes directory into NCM config archive and then into folder named with current date.  pscp with recursion is done in the directory via switches: -r -p .\