MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
@echo off :: Temporarily add plink to PATH set PATH=C:\Program Files\Plink;%PATH% SetLocal EnableDelayedExpansion :: Store input line into different variables FOR /F "tokens=1-3 delims=," %%A IN (c7000-list.csv) DO ( Set _enclName=!_enclName!%%A Set _folderName=!_folderName!%%B Set _oaIP=!_oaIP!%%C CALL :PRINTVARS CALL :MAKEFOLDERS CALL :STORESSHKEY CALL :OABACKUP CALL :VCBACKUP ) GOTO :EOF :PRINTVARS :: Echo statements for troubleshooting & reviewing contents of variables echo enclName=!_enclName! echo folderName=!_folderName! echo oaIP=!_oaIP! :MAKEFOLDERS :: Make directories for each c7000 chassis along with a folder with today's date to store the c7000 config backups md ".\!_folderName! md ".\!_folderName!\%date:~10,4%.%date:~4,2%.%date:~7,2%" :STORESSHKEY :: Connect to SSH host and store key in cache SetLocal DisableDelayedExpansion echo y | plink -ssh admin@%_oaIP% -pw <PWD> exit :OABACKUP :: Run Plink to backup OA config plink.exe -m "D:\c7000_config_backups\ShowAllCmd.txt" -pw <PWD> admin@%_oaIP% >>".\%_folderName%\%date:~10,4%.%date:~4,2%.%date:~7,2%"\%_enclName%-OA-ShowAll.txt 2>>&1 :VCBACKUP :: Run VCSU to backup Virtual Connect config "C:\Program Files (x86)\Hewlett-Packard Company\Virtual Connect Support Utility\vcsu.exe" -a configbackup -i %_oaIP% -u admin -p <PWD> -vcu admin -vcp <PWD> -l ".\%_folderName%\%date:~10,4%.%date:~4,2%.%date:~7,2%"\vcConfig-%_enclName%_vc_domain SetLocal EnableDelayedExpansion GOTO :EOF
|How do I send an email from raspberry pi at user login?||8||82|
|Robocopy command line||6||55|
|How can i set a Environment Variable in my Unix script ?||3||67|
|Problem to refer to value||8||45|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!