Category / Active Directory / ConfigMgr (SCCM) / PowerShell / Script / VBS
-
Move computer in AD during OSD
Let’s say you want to re-image a computer in your active directory domain. But you want it to move from e.g. the Windows 7 OU to the Windows 10 OU. If the PC already exists in AD, it will not be moved even if you specify the new OU in your SCCM task sequence in…
-
VB script with logging template
123456789101112131415161718Dim objFSO, myLog, dt, dtformattedConst For_Writing = 2Set objFSO = CreateObject("Scripting.FileSystemObject")Set myLog = objFSO.OpenTextFile("C:\temp\my.log", For_Writing, True)'Main scriptwritelog "yes it works now"myLog.CloseFunction LPad (str, pad, length)LPad = String(length - Len(str), pad) & strEnd FunctionFunction WriteLog (str)dt = Nowdtformatted = year(dt) & "-" & LPad(Month(dt), "0", 2) & "-" & LPad(Day(dt), "0", 2) & " " & LPad(Hour(dt), "0", 2) & ":" & LPad(Minute(dt), "0", 2) & ":" & LPad(Second(dt), "0", 2)myLog.WriteLine dtformatted & " ### " & strEnd Function -
Lenovo BIOS update script
This script can be used in a task sequence (MDT or SCCM) to upgrade the BIOS on Lenovo PCs eg. during Operating System Deployment.