Skip to content

Category: Deployment

Changing a computers asset tag in the MDT database

My brother (Stefan van Bruggen) wrote this function for me. I will be using this function in my script(s) that I’m writing to allows my customers and co-workers to add and change various information without manually manipulating the MDT SQL database.

The script uses the MDTDB module created by Michael Niehaus (which can be foundĀ HERE). This module allows you to change a lot of information in the database except for the asset tag.

Add this to the MDTDB.psm1 to be able to change the asset tags and the other scripts, which I will post on here soon.

function Set-MDTComputerAssetTag {
 
    [CmdletBinding()]
    PARAM
    (
        [Parameter(ValueFromPipelineByPropertyName=$true, Mandatory=$true)] $id,
        [Parameter(ValueFromPipelineByPropertyName=$true)] $assetTag
    )
    
    Process
    {
        # Tell SQL which table to edit and what to look for
        $sql = "UPDATE ComputerIdentity 
        SET AssetTag = '$assetTag'
        WHERE ID = '$id'"
        Write-Verbose "About to execute command: $sql"
        $identityCmd = New-Object System.Data.SqlClient.SqlCommand($sql, $mdtSQLConnection)
        $identity = $identityCmd.ExecuteScalar()
        Write-Verbose "Added computer identity record"
 
        
        # Write the updated record back to the pipeline
        Get-MDTComputer -ID $id
    }
}

 

Leave a Comment

Make an existing MDT (2012 update 1) enviroment ready for Windows 10

In this post, I will describe the steps needed to update a existing Microsoft Deployment Toolkit (MDT) 2012 environment to MDT 2013 Update 2. This MDT update is needed to prepare for a new automated Windows 10 deployment.

Requirements

MDT 2013 Update 2 has the following requirements

Install Windows ADK for Windows 10

On the existing MDT server, download the Windows ADK for Windows 10 update files. I have placed these files on D:\Downloads\ADK.

  1. Log on to the server with an account that has administrator rights.
  2. Start the ADK Setup (D:\Downloads\ADK\adksetup.exe), and click Continue.
  3. On the Select the features you want to change page, select the features below and complete the wizard using the default settings:
    1. Deployment Tools
    2. Windows Preinstallation Environment (Windows PE)
    3. User State Migration Tool (UMST)

Install MDT 2013 Update 2

Download the MDT 2013 Update 2 files to D:\Downloads\MDT

  1. Install MDT (D:\Downloads\MDT 2013\MicrosoftDeploymentToolkit2013_x64.msi) with the default settings
  2. Start the Deployment Workbench
  3. Right click on your Deployment Share and click ‘Upgrade Deployment Share’. This update can take a while, depending on the size of your MDT environment.
Leave a Comment

Use WMIC to get the exact model/make of your computer

A short tip and note to myself. A quick way to get the exact model and manufacturer from a Windows PC using the command line.

wmic computersystem get model,name,manufacturer,systemtype

This command gives me all the information I need to add the client for MDT deployments..

We usually configure MDT to look for the Model + Manufacturer to locate the drivers needed for the computer. We will add a driver group on the MDT Deployment share and inject the drivers in the MDT Task Sequence to filter the drivers like ‘Windows 7 x64\%make%\%model%. These are Windows variables.

This will give us the following folder tree for the Out-of-Box Drivers folder in MDT.

MDTdrivesr

 

Leave a Comment