Commit cd56cff8 authored by Michael Kleger's avatar Michael Kleger
Browse files

Initial Commit

parents
File added
@ECHO OFF
mode con: cols=120 lines=40
REM #===============================================================================================================================================
REM # Programm : InventoryExport.cmd
REM # Version : 1.0
REM # Beschreibung : RVTool vCenter Inventory Export to XLS
REM # RVTool Download: http://www.robware.net/
REM #------------------------------------------------------------------------
REM # Autor : Michael Kleger, klem, ZHAW
REM # Datum : 28.05.2013
REM #===============================================================================================================================================
REM #------------------------------------------------------------------------
REM # Variablen setzen
REM #------------------------------------------------------------------------
SET "RVTool=C:\Program Files (x86)\RobWare\RVTools\RVTools.exe"
SET "FORFILES=D:\VMware Scripts\Forfiles.exe"
SET "vCenterUser=<EXPORT-USER"
SET "vCenterPasswort=<EXPORT-PASSWRT>"
SET "vCenterServer=<VMWARE-vCENTER-URL>"
SET "RemoteUser=<SHARE-USER>"
SET "RemotePasswort=<SHARE-PASSWORT>"
SET "RemoteShare=\\pools01.zhaw.ch\T\T-INIT-Operating\Dokumente\Inventory"
SET "FileName=RVTool-%vCenterServer%-%date%.xls"
REM #------------------------------------------------------------------------
REM # Script
REM #------------------------------------------------------------------------
net use %RemoteShare% /user:%RemoteUser% %RemotePasswort% /PERSISTENT:NO
"%RVTool%" -u %vCenterUser% -p %vCenterPasswort% -s %vCenterServer% -c ExportAll2xls -d %RemoteShare% -f %FileName%
"%FORFILES%" /p "%RemoteShare%" /s /m *.* /c "cmd /c Del @path" /d –30
net use * /delete /yes
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment