Jump to content

Recommended Posts

Posted

Hi everyone,

 

I would like some information regarding MDT and database configuration. We set up the database using Microsoft 2014 SQL. Everything seems to be working as it connects to the database when we image a machine. However, the problem that we have currently is populating the database with the computer descriptions. for example , we might need set of computer for Admin and another set Teachers. We would like to insert these names in computer description one they have been deployed. How do we set this on the database ? there does seem to be field to set computer description in the MDT database. Currently we are using server 2012r2 and SQL enterprise 2014 for our project.

 

Thanks in advance.

Posted

Well you can add them in via a CSV file and powershell if you don't want to manually type them in.

 

For powershell, we had to get hold of MDTDB.psm1 which is the module that supports MDT.

Here is our powershell

Import-Module -name "D:\Scripts\MDTDB.psm1"

Connect-MDTDatabase –sqlServer Blah –instance SQLEXPRESS –database MDT

$machines = Import-Csv pcimport.csv

For ($i=0; $i -lt $machines.count; $i++)

   {
  New-MDTComputer -macAddress $machines[$i].MacAddress -description $machines[$i].Description -settings @{
     OSInstall='YES';
     OSDComputerName=$machines[$i].OSDComputerName;
     
     xresolution=$machines[$i].xresolution;
     yresolution=$machines[$i].yresolution;
     MachineObjectOU=$machines[$i].MachineObjectOU;
     TaskSequenceID=$machines[$i].TaskSequenceID;
     DomainAdmin=$machines[$i].DomainAdmin;
     DomainAdminPassword=$machines[$i].DomainAdminPassword;
     JoinDomain=$machines[$i].JoinDomain
  }
}

 

and here is an example of our CSV file

Description,UUID,MacAddress,Make,Model,OSDComputerName,MachineObjectOU,TaskSequenceID,xresolution,yresolution,DomainAdmin,DomainAdminPassword,JoinDomain
AD-MR1,,D4:XX:D9:90:8D:50,,,AD-MR1,"OU=Misc,OU=Admin,OU=Windows 7 Stations,OU=Workstations,OU=Computers,OU=Custom,DC=School,DC=internal",WIN7ENT32,1024,768,SetupAccount,Password,SchoolDomain

Posted

Hi,

 

Thank you for you fast reply. This script will be very handy when we start to mass import and deploy the machines. however, we are just in the testing phase and would like some information on how to get computer description applied via the MDT database currently, for example , the field we need to fill in the database to generate a computer description ? .:rolleyes:

Posted

If you have a look at the CSV above, you will see that the first field is the Description. This matches the description field in MDT when you expand the Database\Computers node.

 

In MDT when you click to Create a new record you will see that the description field is optional, as it uses any of the 4 Identiciation values (which for us is always MAC address)

The values in our CSV are about the minimum we find are needed as we just deploy a single flat OS WIM file out and don't have any packages/roles for computers since we do that with WPKG

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...