cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Madrilleno
Engaged Sweeper II
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
1 ACCEPTED SOLUTION
Madrilleno
Engaged Sweeper II
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}

View solution in original post

1 REPLY 1
Madrilleno
Engaged Sweeper II
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}