Kaseya Community

Need to deploy to large subset of people in org

  • I have a bunch (more than 100) users who are spread across all of our Kaseya OUs and have nothing in common with one another (for a custom View, for example). Is there a way to upload a spreadsheet of users who should have an agent procedure run on them? How have people handled this?

    Thanks!

  • Have your procedure write the .CSV of users to the endpoint, then getvariable filecontent, then checkvar to see if your variable contains the logged-in user. If so execute further steps as required.

    Sorry for brevity, typing on mobile device. Let me know if you need more explanation.

  • I would do that with the APIs - you can probably get the agent IDs using a "last user" filter, then invoke the run procedure API for each match.

    Glenn

  • ,  it might be a little time consuming, but create a custom field, and just put "Yes" in there for each person.   You can write a simple agent procedure to populate that for you (use the "updateSystemInfo" command).    You could go down the list, click all the users (I would probably do them in groups of 10, because inevitably I would get to #75 and click wrong!), and run the update procedure on them.

    Once it is all populated, you can easily create a view for the custom field = "Yes".

    2nd way (easier?), create a custom view that is comprised of only the machines you select.   You do this at Views,  Machine Filter, "Only show selected machine IDs"  (you will have to save first in order for this to work).

    Good luck!

  • I am interested in this procedure, but could you provide more detail once you're in front of a computer?

    Thanks!

  • Sorry - I'm going to disagree here. Creating custom fields willy-nilly is never a good idea. While this will technically work, using a custom field for one-off situations like this makes it difficult to implement well-structured automation in the future. We work with many MSPs and this has been one of the key roadblocks to them developing their own automation.

    Also, if you think about the work needed to either manually set the custom field data OR find the users and select the machines they use to define a custom view, you might as well just manually run the procedure directly when you identify the asset!

    If you'd like to pursue the API method and don't have the time or programming expertise to develop it yourself, reach out to me. This would take less than 30 minutes of Professional Services time and would provide a solution that will read your existing Excel/CSV file, identify the agent by name or last user ID (or other criteria), and execute the procedure where there's a match. These typically run at a rate of 10-16 per second and would not require any changes, software installation, or configuration of your VSA. The tool would run from your workstation, prompt for your credentials, and then perform the search & execute process.

    Glenn

  • OK, what about this? is there any way to set a View that shows all machines in a particular time zone?

  • I'm not sure where my previous reply went - seems to have disappeared so I will re-post.

    I am very interested in any examples you have used in the past of this? We have never created a script like this before and would love to see a detailed example.

    Thanks!

  • You could probably do a WMI query in the agent procedure and get the machines Timezone , then add an IF statement and only execute  your function to those machines that match your required timezone

    This qery gives current time zone offset

    strComputer = "."

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")

    Set colItems = objWMIService.ExecQuery( _

       "SELECT * FROM Win32_OperatingSystem",,48)

    For Each objItem in colItems

       Wscript.Echo "-----------------------------------"

       Wscript.Echo "Win32_OperatingSystem instance"

       Wscript.Echo "-----------------------------------"

       Wscript.Echo "CurrentTimeZone: " & objItem.CurrentTimeZone

    Next

    So in a Kaseya Agent  procedure you need to execute a get variable step , select WMI and specify the following

    root\CIMV2:Win32_OperatingSystem.CurrentTimeZone

    Paul