Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
@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.
|I have a very restricted PC (gpo - not batch or command shell). how can i run a batch from gpo during log off process ?||3||89|
|Advice in Xamarin||21||109|
|How to append an output to existing file with DOS and IPerf||2||60|