Install the SCCM Client with a Batch File

Tired of waiting for the Deployment wizard to finish on the SCCM console? Me too. I’ve found that when I am formatting PCs and need them to install the SCCM client it is much faster to install it manually using a batch file. Adjust the line below and replace SCCMSERVER with the FQDN of your SCCM server.

@ECHO OFF
ECHO Starting SCCM Install...
START \\SCCMSERVER\SMS_P01\Client\ccmsetup.exe /mp:SCCMSERVER /logon SMSSITECODE=AUTO
ECHO SCCM Finished...

Change Default Gateway with a Batch file

Below is a useful script to change a default gateway IP address on a Windows 7 network adapter.

@ECHO OFF
Set Gateway=192.168.1.99
for /f "tokens=4*" %%a in ('netsh interface ipv4 show interfaces ^| find " connected" ^| find /v /i "Loopback"') do Set NIC=%%b
netsh interface ipv4 delete route prefix=0.0.0.0/0 interface="%nic%"
netsh interface ipv4 add route prefix=0.0.0.0/0 interface="%nic%" nexthop=%gateway% publish=Yes