@echo off :: :: :start cls set VERZ=%~dp0 color 0f echo -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- echo -* *- echo -* User:%USERNAME% *- echo ** ** echo ** ** echo ** ** echo ** ** echo ** ** echo ** ** echo ** ** echo ** ** echo ** - Powershell - ** echo ** ==================== ** echo *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* echo ** ** echo * - M-E-N-U-E - * echo ** ______________ ** echo ** ** echo ** 1.)= Powershell ** echo ** ----------------- ** echo ** 2.)= ** echo ** --------------------- ** echo ** 3.)= ** echo ** _____________ ** echo ***-----------------------------------------------------------*** echo * * echo * * echo * * echo *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* echo. set /p Rechnername= Bitte CLIENT-ID / Hostnamen eingeben : ::Prüfen, ob Rechner anpingbar ist. ping %Rechnername% -n 1 IF NOT %ERRORLEVEL%==0 echo ***** ACHTUNG: Rechner konnte nicht angepingt werden IF NOT %ERRORLEVEL%==0 set ERRORLEVEL=2 & goto eof set /p Reparatur=Bitte waehlen Sie eine Option aus: echo ============================================== if "%Reparatur%"=="1" set RepInfo="Power" if "%Reparatur%"=="2" set RepInfo="Leer" if "%Reparatur%"=="0" set RepInfo="neue Eingabe" set geraeteTyp=%Rechnername:~6,1% echo -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- echo ** ** echo ** Rechnername: %Rechnername% ** echo ** ** echo ** Geraetetyp: %geraeteTyp% ** echo ** (C= Client) ** echo ** (L= Laptop) ** echo ** ** echo ** Betriebsystem: Windows -%bitVersion%bit ** echo ** ** echo ** Auswahl war:%RepInfo% ** echo ** ** echo -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- echo. goto init goto eof :init if "%Reparatur%"=="1" goto Power if "%Reparatur%"=="2" goto 22 goto eof :Power echo ******************************************************************************* echo ***** ******** echo ******************************************************************************* echo ***** ...Bitte warten, Power wird durchgeführt.... ******** echo ******************************************************************************* robocopy "%VERZ%\source" "\\%Rechnername%\c$\Temp\Power" /mir ::robocopy "%VERZ%\SCCM_Client" "\\%Rechnername%\c$\Temp" /mir psexec \\%Rechnername% -s "c:\temp\Power\_install.cmd" -f goto eof :22 echo ******************************************************************************* echo ***** 222222222222222222 ******** echo ******************************************************************************* echo ***** ...Bitte warten, Installation wird durchgeführt.... ******** echo ******************************************************************************* goto eof :eof if "%errorlevel%"=="0" color 02 & goto farbegesetzt if "%errorlevel%"=="1" (color 02) else (color 0c) :farbegesetzt echo **************************************************************************** echo ***** AKTIVIERUNG Abgeschlossen - Error Code beachten! *** echo **************************************************************************** pause cls goto start