Jump to content

Recommended Posts

Posted

Hi Everyone,

I am hoping someone can help out here, I am trying to populate several values when importing computers into MDT 2012 I can import the computers ok but not all values are importing.

This is the script i am using to do the bulk import:

 

import-Module –name D:\MDTDB.psm1

Connect-MDTDatabase –sqlServer WSH-LABDC-01 –instance SQLEXPRESS –database MDT

$machines = Import-Csv D:\Import.txt

For ($i=1; $i -le $machines.count; $i++)

{

New-MDTComputer -macAddress $machines[$i-1].mac -settings @{

OSInstall='YES';

OSDComputerName=$machines[$i-1].name;

OrgName='RM PLC.'

}

}

 

And this is the text file with the computers to import, I would like to populate the other fields like UUID, serial number, asset tag and description, but only the MAC and ID are shown in the console:

 

Name,UUID,MAC

ADMINLAP,000EF65E-5740-8014-BF5A-020090D138EA,00:24:8C:9E:FC:0E

 

Any help with this would be appreciated greatly.

Posted

If you want to add into the UUID field, you might want to try adjusting your NEW-MDTComputer line.

The following adds in the mac address and the description field when we run our script.

New-MDTComputer -macAddress $machines[$i].mac -description $machines[$i].name -settings @{

  • Thanks 1
Posted
Thanks Boredguy, that did the trick, I can now populate all the computer properties displayed for computers within the console! you my man are a star! :first:

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...