-
-
Save Henness0666/3e2e9a72902e7ddd64967be864609210 to your computer and use it in GitHub Desktop.
Laptop Deployment Tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Settings] | |
Priority=Default | |
[Default] | |
SkipBDDWelcome=YES | |
DeployRoot=\\OSNFLABR1500\Securebook$ | |
UserDomain=osn.wa.gov | |
UserID=YOUR ADMIN USERNAME | |
UserPassword=YOUR ADMIN PASSWORD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Function UserExit | |
Function UserExit(sType, sWhen, sDetail, bSkip) | |
Dim serialNumber | |
serialNumber = GetComputerSerial() | |
If Len(serialNumber) > 11 Then | |
serialNumber = Right(serialNumber, 11) | |
End If | |
oEnvironment.Item("OSDComputerName") = "OSNE" & serialNumber | |
UserExit = Success | |
End Function | |
' Function to get computer serial number | |
Function GetComputerSerial() | |
Dim objWMIService, colBIOS, objBIOS | |
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") | |
Set colBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS") | |
For Each objBIOS in colBIOS | |
GetComputerSerial = objBIOS.SerialNumber | |
Exit For | |
Next | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
NET SESSION >NUL 2>&1 | |
IF %errorlevel% == 0 ( | |
ECHO Script is running with administrative privileges | |
) ELSE ( | |
ECHO Error: Please run this script with administrative privileges | |
EXIT /b 1 | |
) | |
REM Configuration | |
SET TimeServerAddress=ghc-s1.ghc.local | |
SET KMSServerAddress=kms.ghc.local | |
SET KMSServerPort=1688 | |
SET WindowsProductKey=NPPR9-FWDCX-D2C8J-H872K-2YT43 | |
SET WindowsVersion=Windows 10/11 Enterprise x64 | |
SET OfficeProductKey=NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP | |
SET OfficeVersion=Microsoft Office 2019 | |
SET OSPPPath=C:\Program Files\Microsoft Office\Office16\ospp.vbs | |
REM Time Sync Script | |
ECHO Added "%TimeServerAddress%" to time server peer list... | |
W32TM /config /manualpeerlist:%TimeServerAddress%,0x8 /syncfromflags:MANUAL /reliable:yes | |
ECHO Updateing w32tm config... | |
W32TM /config /update | |
NET STOP w32time | |
ECHO Disabling "Secure Time Seeding" in registery... | |
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config /v UtilizeSslTimeData /t REG_DWORD /d 0 /f | |
ECHO Configuring max phase correction settings to allow Windows to ignore large time discrepancies... | |
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v MaxPosPhaseCorrection /t REG_DWORD /d 0xFFFFFFFF /f | |
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v MaxNegPhaseCorrection /t REG_DWORD /d 0xFFFFFFFF /f | |
NET START w32time | |
ECHO Syncing system time with "%TimeServerAddress%"... | |
W32TM /resync /force | |
ECHO Setting w32time service to start automatically... | |
SC config w32time start=auto | |
ECHO Resetting max phase correction settings back to defualt... | |
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v MaxPosPhaseCorrection /t REG_DWORD /d 0x1e8480 /f | |
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config /v MaxNegPhaseCorrection /t REG_DWORD /d 0x1e8480 /f | |
REM Product Activation Script | |
ECHO Setting KMS server address to "%KMSServerAddress%:%KMSServerPort%"... | |
CSCRIPT slmgr.vbs /skms %KMSServerAddress%:%KMSServerPort% | |
ECHO Retrieving current license information... | |
CSCRIPT slmgr.vbs /dlv | |
ECHO Removing old Windows product key... | |
CSCRIPT slmgr.vbs /upk | |
ECHO Applying %WindowsVersion% key... | |
CSCRIPT slmgr.vbs /ipk %WindowsProductKey% | |
ECHO Activating %WindowsVersion%... | |
CSCRIPT slmgr.vbs /ato | |
ECHO Applying %OfficeVersion% key... | |
CSCRIPT "%OSPPPath%" /inpkey:%OfficeProductKey% | |
ECHO Activating %OfficeVersion% products... | |
CSCRIPT "%OSPPPath%" /act |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Settings] | |
Priority=Default | |
Properties=MyCustomProperty | |
[Default] | |
UserExit=GetComputerName.vbs | |
OSDComputerName=#GetOSDComputerName("%SERIALNUMBER%")# | |
_SMSTSORGNAME=Deploying Image to %OSDCOMPUTERNAME% | |
OSInstall=Y | |
AdminPassword=LOCAL "Administrator" ACCOUNT PASSWORD | |
TimeZoneName=Pacific Standard Time | |
JoinWorkgroup=WORKGROUP | |
HideShell=YES | |
DoNotCreateExtraPartition=YES | |
ApplyGPOPack=NO | |
SLSHARE=\\osnflabr1500.osn.wa.gov\Securebook$\Logs | |
SkipComputerName=NO | |
SkipAdminPassword=YES | |
SkipProductKey=YES | |
SkipDomainMembership=YES | |
SkipUserData=YES | |
SkipLocaleSelection=YES | |
SkipTaskSequence=NO | |
SkipTimeZone=YES | |
SkipApplications=YES | |
SkipBitLocker=YES | |
SkipSummary=YES | |
SkipRoles=YES | |
SkipCapture=YES | |
SkipFinalSummary=NO | |
EventService=http://OSNFLABR1500.osn.wa.gov:9800 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment