Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dscoland
Engaged Sweeper III
Hi Lansweeper Community,

I have a question about the best way to run a PowerShell script on our inventoried machines that require the use of the -PolicyExecution Bypass parameter.

What I was thinking is to run a Command within the Deployment settings, and the command would contain:

powershell.exe -executionpolicy bypass -file myScript.ps1

Does this assume that myScript.ps1 is on the Lansweeper server, within the local {PackageShare}\ ?

Also, for scripts, is it best practice to use the system account (assuming that it does not need domain credentials)?

Thank you in advance,
Daniel
1 ACCEPTED SOLUTION
Tomas
Engaged Sweeper III
powershell.exe -executionpolicy bypass -file {PackageShare}\myScript.ps1

yes and yes if you need admin rights.

View solution in original post

1 REPLY 1
Tomas
Engaged Sweeper III
powershell.exe -executionpolicy bypass -file {PackageShare}\myScript.ps1

yes and yes if you need admin rights.

General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now