CScript Error: Can’t find script engine “VBScript” for script

During a OSD task sequence in Configuration Manager, we ran into an error with a VBS script that has worked previously.

The error in the SMSTS.LOG file was: CScript Error: Can’t find script engine “VBScript” for script

The problem appears to be caused by a changed registry value: HKEY_LOCAL_MACHINE\Software\Microsoft\COM3\REGDBVersion

After some searching on the internet the solution was to add the modify the REGDBVersion to a value of hex:01,00,00

Add to task sequence via a Command Line: REG ADD HKLM\Software\Microsoft\COM3 /v REGDBVersion /t REG_BINARY /d 010000 /f

Profit!

PowerShell – Configure Active Directory Permissions to Join Computer to the Domain

In order for MDT to join machines into the contoso.com domain you need to create an account and configure permissions in Active Directory.

These steps will show you how to configure an Active Directory account with the permissions required to deploy a Windows 10 machine to the domain using MDT. These steps assume you have downloaded the sample Set-OUPermissions.ps1 script and copied it to C:\Setup\Scripts on DC01. The account is used for Windows Preinstallation Environment (Windows PE) to connect to MDT01.

  1. On DC01, using Active Directory User and Computers, browse to contoso.com / Contoso / Service Accounts.
  2. Select the Service Accounts organizational unit (OU) and create the MDT_JD account using the following settings:
    1. Name: MDT_JD
    2. User logon name: MDT_JD
    3. Password: P@ssw0rd
    4. User must change password at next logon: Clear
    5. User cannot change password: Select
    6. Password never expires: Select
  3. In an elevated Windows PowerShell prompt (run as Administrator), run the following commands and press Enter after each command:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
    Set-Location C:\Setup\Scripts
    .\Set-OUPermissions.ps1 -Account MDT_JD -TargetOU "OU=Workstations,OU=Computers,OU=Contoso"
    
  4. The Set-OUPermissions.ps1 script allows the MDT_JD user account permissions to manage computer accounts in the Contoso / Computers OU. Below you find a list of the permissions being granted:
    1. Scope: This object and all descendant objects
      1. Create Computer objects
      2. Delete Computer objects
    2. Scope: Descendant Computer objects
      1. Read All Properties
      2. Write All Properties
      3. Read Permissions
      4. Modify Permissions
      5. Change Password
      6. Reset Password
      7. Validated write to DNS host name
      8. Validated write to service principal name

Devcon.exe “Disable failed” on Windows 7 x64

I was needing to disable some devices on a Windows 7 x64 computer. Did the usual download from Microsoft then constructed the syntax. I kept getting: Disable failed.

I have this working on WIndows XP x86. After some googling it turned out that the 64 bit version of Devcon.exe that is available to download from Microsoft is not compatible for windows 7 64 bit. Go figure.

You need to extract it from Windows Server 2003 x64 DVD.

Here is a link for the x64 version of Devcon.exe (zipped):

https://www.dropbox.com/s/rre9l69jjy4vdyr/devcon.zip


Disabling devices using Devcon

  1. List all devices to a text file: devcon find *> d:\list.txt
  2. Verify the device is unique: devcon find *VEN_1113
  3. devcon disable *VEN_1113

Lenovo BIOS Settings Tool (VBScript & WMI)

Here are the tools for updating your Lenovo machine’s BIOS settings and BIOS password. Please note the password cannot be set using this method when one does not already exist. Passwords can only be updated or cleared.

ThinkPad Models:
http://support.lenovo.com/en_US/detail.page?LegacyDocID=MIGR-68488

ThinkCentre M58:
http://support.lenovo.com/en_US/detail.page?LegacyDocID=MIGR-73098

ThinkCentre M90:
http://support.lenovo.com/en_US/downloads/detail.page?&LegacyDocID=MIGR-75407

ThinkCentre M91:
http://support.lenovo.com/en_US/downloads/detail.page?DocID=UM010121

ThinkCentre M92:
http://support.lenovo.com/en_NZ/downloads/detail.page?DocID=UM015241

VMware View Optimization Guide for Windows 7

Great guide to optimise your virtual Windows 7 build using Microsoft Deployment Toolkit. Takes you through services, profiles and registry setting in an easy to read document.

PDF: http://www.vmware.com/files/pdf/VMware-View-OptimizationGuideWindows7-EN.pdf

WMI Code Generator 7.03

The WMI Code Generator 7.03 tool is similar to Scriptomatic but even more powerful. It is a great tool to quickly learn and create WMI management scripts. WMI Code Generator can create code that can be run on the Local Computer, Remote computer or a group of remote computers, based on what you choose from the Target Computer menu.

Check it out at: http://www.robvanderwoude.com/wmigen.php