Kaseya Community

Shortcut to a drive with user's login name

This question is answered

I'm trying to write a procedure to create a shortcut to a drive for all of the users in the company, the catch is that the drive location includes the username of the user.  So for instance the path would be \\server\folder\username for each user.  So using the #vMachine.LoginName# variable to get the username, is there a way to set up something to create a shortcut to \\servername\folder\#vMachine.LoginName#?  This got thrown at me last minute (go live at 5am local tomorrow and it's 2:30pm now) so I haven't had a chance to really poke into the variables yet to really understand what I'm looking at.



changed from "mapped" to shortcut
[edited by: trevor.okazaki at 2:47 PM (GMT -7) on Sep 24, 2019]
Verified Answer
  • Nevermind, found out it was easier to do as a GPO.  Made my life easier

  • Agree...

    Kaseya has the values you need with #vAgentConfiguration.currentaUser#, #vAgentConfiguration.loginName# or your suggested #vMachine.LoginName#... BUT the challenge is when to run the procedure?  There isn't a trigger for "just logged in"... and you want to be really careful running something reoccuring for any tight interval.  Of its an option, at login via GPO is easier.

All Replies
  • Nevermind, found out it was easier to do as a GPO.  Made my life easier

  • run a command procedure as user using the windows default variable for users logon name %username%

    net use M: \\servername\sharename\%username%

    If john Doe is the user it will map a drive to:

    M: \\your server\yourshare\jdoe

  • Agree...

    Kaseya has the values you need with #vAgentConfiguration.currentaUser#, #vAgentConfiguration.loginName# or your suggested #vMachine.LoginName#... BUT the challenge is when to run the procedure?  There isn't a trigger for "just logged in"... and you want to be really careful running something reoccuring for any tight interval.  Of its an option, at login via GPO is easier.

  • I was going to suggest a GPO, specifically GPO preferences.

    If someone really wanted to use Kaseya for this, the best approach is to use Kaseya to place a batch file in the all users startup folder.  Kaseya procedures are typically best used to deploy or deploy/execute scripts.