
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2021 12:00 PM
New to Lansweeper and I have a question about scripts and commands aas used in Installers.
Is it possible to pass a username to a script or command from a user?
What I want to happen is to open the user's asset page, then pass their username to a script. For example, if the username is msmith, I want to call a powershell script with one argument
mypowershellscript.ps1 msmith
Thanks
Is it possible to pass a username to a script or command from a user?
What I want to happen is to open the user's asset page, then pass their username to a script. For example, if the username is msmith, I want to call a powershell script with one argument
mypowershellscript.ps1 msmith
Thanks
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2021 12:47 PM
Madrilleno wrote:
New to Lansweeper and I have a question about scripts and commands aas used in Installers.
Is it possible to pass a username to a script or command from a user?
What I want to happen is to open the user's asset page, then pass their username to a script. For example, if the username is msmith, I want to call a powershell script with one argument
mypowershellscript.ps1 msmith
Thanks
Got it. Created an advanced action -
powershell.exe {actionpath}mypowershellscript.ps1 {username}
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2021 12:47 PM
Madrilleno wrote:
New to Lansweeper and I have a question about scripts and commands aas used in Installers.
Is it possible to pass a username to a script or command from a user?
What I want to happen is to open the user's asset page, then pass their username to a script. For example, if the username is msmith, I want to call a powershell script with one argument
mypowershellscript.ps1 msmith
Thanks
Got it. Created an advanced action -
powershell.exe {actionpath}mypowershellscript.ps1 {username}
