How do I populate the device list in a script by importing contents of a csv file?
I have a list of devices in a csv file that I want to import into the device list of a script that I want to deploy. Is this possible?
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
JasonEgg
7 years ago
A workaround I've used before:
- Use a text editor to get all computer names separated by pipes ( | character). E.G. MyComputer|MyLaptop|John-Desktop
- Go to device inventory and open Advanced Search
- Set the search to "System Name" "matches REGEX" and paste the list of computers separated by pipes. Click Search.
- Check the select all checkbox, apply a manual label to the devices
- Use the manual label as the target label in your script
Keep in mind that computers will keep the manual label applied to them until it is manually removed. This means that the script will keep running on the computers. A workaround for this would be to have the script create a file or reg entry on success, then make the first step of the script a check for that file.