+ Post New Thread
Results 1 to 6 of 6
O/S Deployment Thread, Adding Description to Database in Technical; I am trying to bulk populate the MDT Database. I have followed Mitch Tullochs article here ; Deploying Windows 7 ...
  1. #1

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,196
    Thank Post
    440
    Thanked 318 Times in 269 Posts
    Rep Power
    153

    Adding Description to Database

    I am trying to bulk populate the MDT Database. I have followed Mitch Tullochs article here ;

    Deploying Windows 7 - Part 22: Bulk Populating the MDT Database Using PowerShell :: Windows 7 :: Articles & Tutorials :: WindowsNetworking.com

    but this doesnt populate the description field. I would like to populate the description field with the computer name. I tried following this ;

    Bulk import of computers in MDT 2012

    but couldnt get it running it said "Description" was invalid.

    Can anyone give me a sample script to populate mac address, computer name and description?

  2. #2

    Join Date
    Jul 2012
    Location
    Boerne Texas USA
    Posts
    45
    Thank Post
    0
    Thanked 9 Times in 9 Posts
    Rep Power
    6
    Would you mind posting your relevant code so we can take a look?

  3. #3

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,196
    Thank Post
    440
    Thanked 318 Times in 269 Posts
    Rep Power
    153
    Quote Originally Posted by jklight View Post
    Would you mind posting your relevant code so we can take a look?
    Here it is - I have no idea what I am doing with Powershell but I tried to follow those articles mentioned above.

    Import-Module –name C:\Scripts\MDTDB.psm1

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

    $machines = Import-Csv C:\scripts\machines.csv

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

    {

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

    OSInstall='YES';

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


    OrgName='myschool'

    }

    }

  4. #4

    Join Date
    Jul 2012
    Location
    Boerne Texas USA
    Posts
    45
    Thank Post
    0
    Thanked 9 Times in 9 Posts
    Rep Power
    6
    The description doesn't go in the settings.
    From Boardguy (via the link you provided) New-MDTComputer -macAddress $machines[$i].mac -description $machines[$i].name -settings @{

    So your modified code would look:
    Code:
    Import-Module –name C:\Scripts\MDTDB.psm1
    
    Connect-MDTDatabase –sqlServer MDT –instance SQLEXPRESS –database MDT
    
    $machines = Import-Csv C:\scripts\machines.csv
    
    For ($i=1; $i -le $machines.count; $i++)
    
    {
    
    New-MDTComputer -macAddress $machines[$i-1].mac -description $machines[$i-1].name -settings @{
    
    OSInstall='YES';
    
    OSDComputerName=$machines[$i-1].name;
    
    OrgName='myschool'
    
    }
    
    }

  5. Thanks to jklight from:

    fiza (25th July 2013)

  6. #5

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,196
    Thank Post
    440
    Thanked 318 Times in 269 Posts
    Rep Power
    153
    Quote Originally Posted by jklight View Post
    The description doesn't go in the settings.
    From Boardguy (via the link you provided) [COLOR=#333333]New-MDTComputer -macAddress $machines[$i].mac -description $machines[$i].name -settings @{
    Thanks - Will give that a go

  7. #6

    fiza's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    2,196
    Thank Post
    440
    Thanked 318 Times in 269 Posts
    Rep Power
    153
    Quote Originally Posted by jklight View Post
    The description doesn't go in the settings.
    Perfect - That worked - Thank you.

SHARE:
+ Post New Thread

Similar Threads

  1. Adding Server to Domain: An Error With no Description Has Occurred
    By Gongalong in forum Windows Server 2008
    Replies: 3
    Last Post: 5th December 2011, 02:22 PM
  2. Adding favourites to groups
    By ictex in forum Windows
    Replies: 6
    Last Post: 20th April 2008, 05:31 PM
  3. questionaire linked to database help please!!!!!!!!!!!!!!!!!
    By suesmate in forum Educational Software
    Replies: 8
    Last Post: 3rd May 2006, 06:07 PM
  4. Manually adding records to DNS server
    By fooby in forum Wireless Networks
    Replies: 22
    Last Post: 20th January 2006, 09:17 AM
  5. Adding shortcuts to Sims.net
    By eejit in forum Windows
    Replies: 26
    Last Post: 22nd June 2005, 03:35 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •