-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsccm_install.bat
35 lines (29 loc) · 1.46 KB
/
sccm_install.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
set LOGFILE=%SystemDrive%\Windows\Logs\install_sccm_client.log
set curTimestamp=%date:~7,2%_%date:~3,3%_%date:~10,4%_%time:~0,2%_%time:~3,2%
echo Provisioning Starting Time: %curTimestamp% >> %LOGFILE%
echo Creating Logs Folder >> %LOGFILE%
mkdir C:\Logs >> %LOGFILE%
echo Expanding sccmclient.cab >> %LOGFILE%
expand -r sccmclient.cab -F:* . >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Installing SCCM Client Software >> %LOGFILE%
Ccmsetup.exe >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Installing Google Chrome
googlechromestandaloneenterprise64.msi /qn >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Copying Start Menu Configuration >> %LOGFILE%
copy DefaultLayouts.xml C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\StartMenu.xml >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
copy LayoutModification.xml C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Creating Scheduled Task >> %LOGFILE%
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -File AddLocalMachineToCollection.ps1 >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Adding AutoLogin to local test account >> %LOGFILE%
regedit.exe /S autologin.reg >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Running GP Update >> %LOGFILE%
gpupdate /force >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Provisioning Completed at:%curTimestamp% >> %LOGFILE%