
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 08:06 PM
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
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
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
‎05-22-2017 08:12 PM
powershell.exe -executionpolicy bypass -file {PackageShare}\myScript.ps1
yes and yes if you need admin rights.
yes and yes if you need admin rights.
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 08:12 PM
powershell.exe -executionpolicy bypass -file {PackageShare}\myScript.ps1
yes and yes if you need admin rights.
yes and yes if you need admin rights.
