Blog Image

Blog - Dries Willems - Freelance IT Consultant

About the blog

The main reason I use this blog, is to help myself tackling similar issues. You can see this as a very small online documentation library.
Also it is useful for others who experience the same issues.

Run VBScripts OSD Task Sequence

IT Posted on 08/13/2014 16:11:23

Backup Registry
REG EXPORT HKLM\Software\Microsoft\COM3 %temp%\com.reg /y

Change Registry Key
REG ADD HKLM\Software\Microsoft\COM3 /v REGDBVersion /t REG_BINARY /d 010000 /f

Move Computer to New OU
wscript.exe Move_Comp_To_OU.vbs “OU=New,OU=Computers,OU=XX,DC=XX,DC=XX”
Disable 64-bit file system redirection
PKG_XX_OSD_Scripts
XX.XX\srv-dom

Restore Registry Backup
REG IMPORT %temp%\com.reg



WMI Queries

WQL/WMI Posted on 08/13/2014 16:09:07

root\cimv2
SELECT * FROM Win32_ComputerSystem WHERE Manufacturer LIKE “%DELL%”

root\cimv2
SELECT * FROM Win32_ComputerSystem WHERE Model LIKE “%CF-53%”

root\cimv2
SELECT * FROM Win32_BaseBoard WHERE Product LIKE “%P5B-TMX%”

root\cimv2
SELECT * FROM Win32_ComputerSystem WHERE Systemtype LIKE “%x64%”

Quick check

run
-> wmic baseboard get product,manufacturer
-> wmic computersystem get model,name,manufacturer,systemtype
-> wmic diskdrive get model



Install Fonts on Windows 7 OSD Task Sequence

IT Posted on 08/13/2014 16:07:48

Copy Fonts to Temp
xcopy *.ttf %SystemDrive%\Temp /Y /I /Q
PKG_XX_XX

Set PowerShell Execution Policy
Powershell.exe -noprofile -command “Set-ExecutionPolicy Bypass LocalMachine” -force

Run Add-Font.ps1
Powershell.exe -noprofile -file Add-Font.ps1 -path “%SystemDrive%\Temp”
PKG_XX_OSD_Scripts

Revert PowerShell Execution Policy
Powershell.exe -noprofile -command “Set-ExecutionPolicy RemoteSigned LocalMachine” -force

Remove C:\Temp
cmd.exe /c rmdir “%SystemDrive%\Temp” /S /Q