Kaseya Community

Kaseya Detect IP, then map drive based off results

  • Im trying to create a script to add a shortcut of a .exe onto the desktop of all users. The .exe is located on a shared drive, that is mapped to the server. I want  to check if the .exe is on the mapped drive, and if not then to re-map the drive. There are 20 buildings like this, each with a different server name but mapped the same drive letter. Example: Building 1 shared drive would be \\Build1share\folder, Building 2 would have \\Build2share\folder - so on and so forth. Since the server name changes per site - i want to make Kaseya check the IP address, which would then determine what server to map. i dont really see anything like this for the IFs and ELSES on the wizard.

    I dont want to have 20 different scripts for this - it would be nice to have one that detects which server its supposed to map.  Any Ideas?

  • Does each building happen to have its own DHCP server or DNS server?  If so, are either of those servers the server with the file share?

  • You could do this with a site based Group Policy, and/or a DFS share.

    Either way, your first job is to configure Active Directory Sites and Services correctly so that the physical topology is understood. It sounds like you already allocate IP's by site, so you just need to transfer that structure into AD, then you can use that data intelligently; e.g. apply a group policy to map the right server based on site.

    However, if you use DFS, your group policy simply mapes the DFS share and you let AD work the rest out seamlessly - that way you can add and remove servers to the DFS pool and never have to update group policy or log users off and on to pick up the changes.

  • GDRBrian - yes each building has its own DHCP and DNS server. They are not located on the file share - that is a whole different server.

    Craig Hart - We actually do have AD setup in OU's representing each building already so looks like we are more than halfway there. Do you mean group policy within AD or  the policy module within kaseya?

  • Managed Variables

    If you have your agents grouped per network you can create a managed variable for each site that has the UNC path for the network share for each site.

    The next problem is the shortcut it self, you could create the shortcut files and then copy them to your Kaseya server for distribution or you could create the shortcut on the fly by using some 3rd party tools or a Vbscript.