22 mai 2015 5 22 /05 /mai /2015 08:31

@echo off
Menu by Vaks
color 0A
:home
cls
echo.
echo Choisissez une tache:
echo ===============================================
echo.
echo 1) EXPLORER: ADMIN
echo 2) COMMAND: ADMIN
echo 3) PSEXEC: Restart SMS Agent Host sur SCCM
echo 4) PSEXEC: Force WSUS
echo 5) PSEXEC: Force GPO
echo 6) PSEXEC: Install le client SCCM
echo 7) PING: Ping de poste
echo 8) SAUVEGARDE Outlook, IE, lecteur rsx, printer
echo 9) PSEXEC: Reinit le client WSUS
echo 10) INTEGRATION Integrer Pc dans le domaine
echo 0) Exit: Sortir...
echo.


set /p errorlevel=Type option:
if "%errorlevel%"=="1" goto EXPLORER
if "%errorlevel%"=="2" goto COMMAND
if "%errorlevel%"=="3" goto PSEXEC_SMS_AGENT_HOST
if "%errorlevel%"=="4" goto Force_WSUS
if "%errorlevel%"=="5" goto Force_GPO
if "%errorlevel%"=="6" goto SCCM_Client_Install
if "%errorlevel%"=="7" goto Ping
if "%errorlevel%"=="8" goto SAVE
if "%errorlevel%"=="9" goto REINIT
if "%errorlevel%"=="0" goto EXIT
if "%errorlevel%"=="10" goto INTEGRE


:EXPLORER
runas /noprofile /user:ADMIN@local "explorer /separate"
goto home


:COMMAND
RunAs /user:DOMAIN\ADMIN cmd
goto home


:PSEXEC_SMS_AGENT_HOST
set /p Poste= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
set /p Pass= indiquer le Mot de passe ADMIN :
C:\Users\AdminSCCM\Desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN -p "%Pass%" net stop "SMS agent host"
pause
C:\Users\AdminSCCM\Desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN -p "%Pass%" net start "SMS agent host"
pause
GOTO home


:Force_WSUS
set /p Poste= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN wuauclt /resetauthorization /detectnow
pause
GOTO Home


:Force_GPO
set /p Ordi= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Ordi%" -u DOMAIN\ADMIN gpupdate /force
pause
GOTO Home


:SCCM_Client_Install
set /p Poste= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
mkdir \\Entreprise-50%Ordi%\c$\Client
xcopy \\Entreprise-503675\client\*.* "\\Entreprise-50%Poste%\c$\client\*.*" /E /Q /H /K /S /Y
C:\users\adminsccm\desktop\psexec \\Entreprise-50%Poste% -u DOMAIN\ADMIN ccmsetup.exe SMSSITECODE=OC1 FSP=OUTILCLIENT01.LOCAL SMSMP=OUTILCLIENT01.LOCAL
pause
GOTO Home


:Ping
set /p Pong= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
ping Entreprise-50%Pong%
pause
GOTO Home


:EXIT
exit




:SAVE
set /p Poste= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN REGEDIT /e \\Entreprise-503675\d$\partage\Save\OutCmpt.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem"
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN REGEDIT /e \\Entreprise-503675\d$\partage\Save\OutCfg.reg "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook"
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN REGEDIT /e \\Entreprise-503675\d$\partage\Save\IECfg.reg "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer"
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN REGEDIT /e \\Entreprise-503675\d$\partage\Save\LctRsx.reg "HKEY_CURRENT_USER\Network"
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN REGEDIT /e \\Entreprise-503675\d$\partage\Save\ImprRsx.reg "HKEY_CURRENT_USER\Printers"
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN REGEDIT /e \\Entreprise-503675\d$\partage\Save\ImprDft.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows"
pause
GOTO Home


:REINIT
@echo off
set /p Poste= indiquer les 4 derniers chiffres du PC (Entreprise-50_._._._.):
set /p Pass= indiquer le Mot de passe ADMIN :
C:\users\adminsccm\desktop\psexec "\\Entreprise-50%Poste%" -u DOMAIN\ADMIN -p "%Pass%" \\Entreprise001\publicEntreprise\csu\wuauserv.bat
pause
GOTO home


rem il faut le fichier netdom.exe
:INTEGRE
NETDOM JOIN %computername% /Domain:local /userD:partoutatix /passwordD:* /OU:"OU=Pc du Domaine,OU=Micro-Informatique,OU=DOMAIN,DC=DOMAIN,DC=local" /REBOOT:03

Partager cet article

Repost 0

commentaires

Rechercher

Catégories