Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.
@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
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.