Jump to content

Kacper.Michta

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

My Information

  • Agent Count
    500 - 750 Agents
  1. Hi, I am currently using a script provided by another user from the following link: It seems to work perfectly fine when run against a single location, however I have a slight difference. Instead of running this script for a single location and producing an email/ticket from the results. I would like to run this across ALL location IDs and download the installers into a file structure that corresponds to \\ClientName\LocationName\... structure. I have already created the latter part of the script which creates the folders and populates them with the installers, however what I do need, is for it to run against all LocationID's. Is there some sort of SQL I am missing, or an export option somewhere within Automate, where I can retrieve a list of all current Location ID values? I have seen other users here use SQL queries for running scripts on each returned machine, but I have not seen any documentation or forums for returning/running something across all Locations. Is this possible? SOLUTION: Managed to find out how to find this info, I'm sure it's not the most efficient way of doing so, but I have no prior SQL knowledge. So here's my approach, I have a script running an "SQL Get Value" which returns the count of rows in the 'locations' table. I then set whatever the output of this is, to be the top limit for iterating through the locations. Using "SQL Get DataSet" I can grab all column values that I need from the `locations` table. I then iterate and use a counter variable to individually select rows from the DataSet using "SQL Fetch DataSet Row". The script then simply logs the location name along with its ID in the script log (for proof of concept): For now this will be an effective way to run a script on each LocationID value. I might try to get it to output a CSV for a more general use case in the future. Feel free to let me know if this can be improved/if you can spot any glaring mistakes.
×
×
  • Create New...