Showing posts with label Batch files. Show all posts
Showing posts with label Batch files. Show all posts

Thursday, May 12, 2011

SMS to SCCM Auto Migration Script

SMS to SCCM Auto Migration Script

 

Copy.bat

 

xcopy /y ccmsetup.exe c:\windows\temp\
xcopy /y ccmclean.exe c:\windows\temp\
xcopy /y install.bat c:\windows\temp\
schtasks /CREATE /SC MINUTE /mo 90 /TN Migration /TR "C:\windows\temp\install.bat" /RU SYSTEM
schtasks /CREATE /SC MINUTO /mo 90 /TN Migration /TR "C:\windows\temp\install.bat" /RU SYSTEM

 

 

Install.bat

 

C:\windows\temp\ccmclean.exe /client /q
C:\windows\temp\Ccmsetup.exe /mp:ServerName SMSSITECODE=Sitecode

SCHTASKS /delete /TN Migration /F

 

 

Advertise the Copy.bat then automatically clients will installing the sccm

Wednesday, June 9, 2010

Join the computer silently to the Domain

Join the computer silently to the Domain

 

Or, in the command you want to use:

netdom join /d:mydomain.com Computertobeaddednamehere /ud:mydomain.com\administrator /pd:oil@22

Batch file for loop in other way

echo ***** Are you sure you want to add these accounts? *******
echo *** If not, press CTRL-C to terminate this batch file ***
pause
FOR %%X IN (NT1 NT2 NT3 NT4 NT5) DO NET COMPUTER \\%%X /ADD
FOR %%X IN (NT6 NT7 NT8 NT9 NT10) DO NET COMPUTER \\%%X /ADD
cls
echo ******* Machine Accounts Added ********
pause