Jump to content


how can I Import Computers Using a file in SCCM 2007 ?

Recommended Posts

In the Operating System Deployment section of SCCM right click on Computer Association and choose Import Computer Information




when the wizard appears select Import Computers using a file




The file itself must contain the information we need in this (CSV) format




(sample below)







if we look at the last line, I've marked the computer name in Red, the GUID in BLUE and the MAC address in GREEN, separate these values with commas as above.




the file can be a standard TEXT file that you create in notepad, and you can rename it to CSV for easier importing into our wizard...


so, click on Browse and browse to where you've got your CSV file


on the Choose Mapping screen, you can select columns and define what to do with that mapping, eg: you could tell it to ignore the GUID value (we won't however)




on the next screen you'll see a Data Preview, and this is useful as it will highlight any errors it finds with a red exclamation mark, in the example below a typo meant that it correctly flagged the MAC address as invalid




so edit your CSV file again and fix the error, click previous (back) and try again until it looks like this


here's a sample file..macguidcomputername.csv




Next choose the target collection where you want these computers to end up in




review the summary




in SCCM collections, we can now see the computers we've just imported from File,




thats it !


If you want to script this then read this post on MSDN




Share this post

Link to post
Share on other sites

What is the easiest way to get the MAC &/|| GUID of a group of machines? or is there no easy way and it all has to be done manually?

EDIT: By 'manually', I mean going around to every computer and writing it down/copy pasting



Intel provide a script as part of their vPro offering that can be used to automatically import the details into an SCCM collection from a target PC. This is available here:




I have modded the script to allow the details to be appended to a csv file as I was having firewall issues when automatically importing the details into SCCM.


Just insert the code into a .vbs file and run from a command prompt using the cscript command


'Create an object to connect to the local WMI provider
Set objService  = GetObject("winmgmts:\root\cimv2")

'Update the status on the screen
wscript.echo "Looking up host name, FQDN, MAC & UUID..."

'Get the MAC, hostname & DNS information 
Set objNetwork = objService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled = True")
for each objItem in objNetwork
   strMAC = objItem.MACAddress
   'If the computer name was not passed as a command line argument, read it from the local WMI interface
if strHostName="" then
	strHostName = Ucase(objItem.DNSHostName)
end if
if strDNSSuffix="" then
	strDNSSuffix = Ucase(objItem.DNSDomain)
end if       
   strDNSDomain = objItem.DNSDomain


'Combine the computer name and DNS suffix to create the computer's FQDN
strFQDN = Ucase(strHostName & "." & strDNSSuffix)

'Get the UUID
Set objSysComps = objService.ExecQuery("Select * from Win32_ComputerSystemProduct")
set objSysUUID = objService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled = True")
for each objItem in objSysComps
   strUUID = objItem.UUID

'Echo the values that will be added to the SCCM server
wscript.echo "Host Name: " & strHostname
wscript.echo "FQDN: " & strFQDN
wscript.echo "MAC: " & strMAC
wscript.echo "UUID: " & strUUID

Dim Filename 
Dim OutputFile 

Filename = "PC-Details.csv"	'File to output results to 

Set objFSO = CreateObject("Scripting.FileSystemObject") 
If not objFSO.FileExists(Filename) then 
Set objFile = objFSO.CreateTextFile(Filename) 
Wscript.sleep(2000)	'Pause while file is being created 
End If 

'If objFSO.FileExists(Filepath & Filename) then 
'Set objFile = objFSO.GetFile(Filepath & Filename) 
'Lastmodifieddate = objFile.DateLastModified 

Const ForAppending = 8 
Set outputFile = objFSO.OpenTextFile(Filename, ForAppending, true)	' Open file for writing 
OutputFile.WriteLine strHostname & "," & strUUID & "," & strMAC'Write filename and last modified date to output file 
'End If 
set objFSO = Nothing 

Share this post

Link to post
Share on other sites

Hi, thanks for all the excellent info. I was just on ph with MS ( yes of all people!) okay they are telling me ' oh no you mean 'Unknown Computers & etc....' and I am like NO I do not mean Unknown Computers....I don't use Unknown Computers....duuuuh! am I missing something here? I use a csv import and do an SCCM Flash /CD boot...they are not Unknown!...Not only these guys but the SCCM guy on site....I had some problems with this Unknown Computer thing....anyway....and I would rather continue using the import csv....tnks....I had to verify someone else has done this.....



Share this post

Link to post
Share on other sites

hi all,

we are working on replace scenario currently & have imported few xp & win 7 machines in different collections using CSV files.

the only part we are stuck is on the association of these machine ,we don't want to do it manually we want to have an automated process which does this work so that after the machine association we can run the Replace TS.

Can we do this in SCCM 2007 or do we need scripts for this process.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...