Posted on 03-25-2012 04:27 PM
So we have just ordered 1850 MacBook Air computers for our school district. Now apple is gonna asset tag and image them at the factory with a image I have made. So it will have the JAMF helper on it. Apple will then send me a file with all the info from the computer (asset tag, serial #, Mac address, etc.) I know that when come on online on our network they will report some of this info but the asset tag and who it assigned to will have to be entered manually. Is there any way to import the file that apple sends me so that info will not have to be entered manually.
Thanks,
Brian Weeks
Solved! Go to Solution.
Posted on 03-25-2012 07:08 PM
Brian and Don,
take a look at the SDK, specifically the JSS Computer Importer example application.
http://www.jamfsoftware.com/developer-resources/
It may have the functionality you're looking for.
--From the application PDF
The JSS Computer Importer was designed to provide example code for developers interested in developing applications that interact with the JSS API. The primary function of the JSS Computer Importer is to import the following fields from a CSV file to create and update computers in the JSS:
• Asset Tag
• Platform
• Computer Name
• Make
• Model
• MAC Address
• Serial Number
• Username
• Phone
• Real Name
• Department
• Building
• Email Address
• Position
• Room
• Purchased
• Leased
• PO Number
• PO Date
• Warranty Expiration Date
• AppleCare ID
• Lease Expires
• OS AppleCare ID
• OS Maintenance Expires
Posted on 03-26-2012 11:45 AM
Two things I ran into the first time I used the JSS Computer Importer. These may have been addressed by now, but not really sure. The "JSS Computer Importer - Cocoa" application in the SDK I just downloaded still lists a modification date of Aug 12, 2010, so I think these issues are still there.
First, the Purchased and Leased columns, P & Q (or 16, 17) are supposed to be formatted in lower case. If you do a QuickLook on the ImportExample csv on the disk image, you'll see those words in lower case. HOWEVER, if you open it in Excel for editing, it automatically capitalizes these b/c Excel sees words TRUE and FALSE as logical values. So, if you make any edit to the file, save and import, you will get an error from the importer tool, or it will crash. To get around this, you'll have to use something other than Excel to edit your final file. From my experience, Apple's Numbers treats them the same way, so no help there. If you have BBEdit, you can make the initial changes in Excel, save, open in BBEdit and do a global find/replace to change any TRUE to true and FALSE to false, then save and import.
Looking at the file you posted to your OS X Server, I see those fields in cap format, so that is likely the issue.
Second, the only columns that actually MUST to be filled in in addition to MAC Address and Computer Name are the first and last, and there must be exactly 24 (columns A - X) even if all the others are blank. Any more or less will cause an error on import. Check that as well, but as I said, the capital TRUE/FALSE words are likely your culprit.
EDIT: Actually I think its just the last column (OS Maintenance Expires) that must be filled in, not the first, but I can't check that right now.
Since the Importer tool is just an example application and not something really intended to be used by customers, it likely hasn't been updated, but I feel it should be at some point.
Posted on 03-25-2012 06:50 PM
Importing CSV into JSS has been a feature request for a long time. We often have to manually install lists, very tedious. JAMF released JSSConduit.jar which lets you import IP addresses that conform to a specific format (unfortunately doesn't handle CIDR lists). So hoping JAMF elves are burning the midnight oil crafting a CSV import tool. :)
https://jamfnation.jamfsoftware.com/article.html?id=199
Don
Posted on 03-25-2012 07:08 PM
Brian and Don,
take a look at the SDK, specifically the JSS Computer Importer example application.
http://www.jamfsoftware.com/developer-resources/
It may have the functionality you're looking for.
--From the application PDF
The JSS Computer Importer was designed to provide example code for developers interested in developing applications that interact with the JSS API. The primary function of the JSS Computer Importer is to import the following fields from a CSV file to create and update computers in the JSS:
• Asset Tag
• Platform
• Computer Name
• Make
• Model
• MAC Address
• Serial Number
• Username
• Phone
• Real Name
• Department
• Building
• Email Address
• Position
• Room
• Purchased
• Leased
• PO Number
• PO Date
• Warranty Expiration Date
• AppleCare ID
• Lease Expires
• OS AppleCare ID
• OS Maintenance Expires
Posted on 03-26-2012 09:41 AM
So I downloaded the importer app. when I put all the info into the csv and import on the coco app it crashed and on the windows side it say "index was outside the bounds of the array." i have attached a link the csv file see if you can find and problems.
http://wiki.groesbeck.k12.tx.us/importexample.csv
Thanks,
Brian Weeks
Posted on 03-26-2012 09:49 AM
Check the formatting on the fields that have dates in them. They need to be in the format of YYYY-MM-DD.
Posted on 03-26-2012 11:00 AM
changing the date did not fix the error.
Posted on 03-26-2012 11:45 AM
Two things I ran into the first time I used the JSS Computer Importer. These may have been addressed by now, but not really sure. The "JSS Computer Importer - Cocoa" application in the SDK I just downloaded still lists a modification date of Aug 12, 2010, so I think these issues are still there.
First, the Purchased and Leased columns, P & Q (or 16, 17) are supposed to be formatted in lower case. If you do a QuickLook on the ImportExample csv on the disk image, you'll see those words in lower case. HOWEVER, if you open it in Excel for editing, it automatically capitalizes these b/c Excel sees words TRUE and FALSE as logical values. So, if you make any edit to the file, save and import, you will get an error from the importer tool, or it will crash. To get around this, you'll have to use something other than Excel to edit your final file. From my experience, Apple's Numbers treats them the same way, so no help there. If you have BBEdit, you can make the initial changes in Excel, save, open in BBEdit and do a global find/replace to change any TRUE to true and FALSE to false, then save and import.
Looking at the file you posted to your OS X Server, I see those fields in cap format, so that is likely the issue.
Second, the only columns that actually MUST to be filled in in addition to MAC Address and Computer Name are the first and last, and there must be exactly 24 (columns A - X) even if all the others are blank. Any more or less will cause an error on import. Check that as well, but as I said, the capital TRUE/FALSE words are likely your culprit.
EDIT: Actually I think its just the last column (OS Maintenance Expires) that must be filled in, not the first, but I can't check that right now.
Since the Importer tool is just an example application and not something really intended to be used by customers, it likely hasn't been updated, but I feel it should be at some point.
Posted on 03-27-2012 01:46 AM
Got it figured out. It turns out the the Mac Address has to be upper case. So I changed it and everything import successively. Thanks for all the help.
Brian Weeks
Posted on 03-27-2012 07:20 AM
So I've gotten an "Import complete" message from the importer tool but machines aren't actually in my inventory.
Ideas?
Posted on 03-27-2012 08:38 AM
Nevermind. Figured that bit out. In the same vein, anyone ever modify the JSS importer to add in management account information? I can't seem to get mine to stick.
Posted on 03-27-2012 09:59 AM
Nevermind. Figured that out too. Helps if you read your XML files correctly!
Posted on 04-16-2012 09:56 AM
I'm looking at the import example, but there are a few columns I'm unsure they're supposed to be for. Does anyone have the table headings?
EDIT: Ok I found my own answer on this in the documentation provided. Guess I should have read that.
But in regards to "So I've gotten an "Import complete" message from the importer tool but machines aren't actually in my inventory.
Ideas? "
What solved your problem there?
Posted on 04-16-2012 10:11 AM
The read me with the code example tells you the order that the columns go in. You can also open the project in Xcode and the names of them are there in a fairly self-explanatory manner. You can also extend the use of the importer by following the format set forth in the code. I was able to pre-populate management account information as well as some other things.
Posted on 04-20-2012 08:06 AM
Thanks for the help Jared. I got the order of the fields right and ran the importer and got the "Import Complete" message. But like you mentioned earlier, the computers are not showing up in my inventory. What fixed your problem there?
Posted on 04-20-2012 09:43 AM
I did indeed needed to ensure the final field in each row of the the CSV had something in it. If it was blank, I was seeing "success"
Posted on 03-04-2014 02:34 PM
Am I correct that adding computers to a JSS manually via CSV file does not actually enroll the device for management capability?
Is installing QuickAdd pkg the only way to enable management on the device? How else would the JAMF binary get on a machine?
Thank you!
David