
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 03:54 PM
I would like to run a powershell script (.ps1) file which resists on a network share on several clients.
I have tried with the invoke-command etc. but is not a success.
The question is how to run a powershell ps1 file with Lansweeper.
I have already tried the following:
script
powershell.exe -executionpolicy bypass -file \\fsnl\gpodiverse\Teams\Install-MicrosoftTeams.ps1
or
installer
{PackageShare}\powershell.exe -executionpolicy bypass -file \\fileshare\Teams\Install-MicrosoftTeams.ps1
The goal is to install a softwarepackager on some clients which is a msi file and i would like to do this with powershell thru Lansweeper.
I have tried with the invoke-command etc. but is not a success.
The question is how to run a powershell ps1 file with Lansweeper.
I have already tried the following:
script
powershell.exe -executionpolicy bypass -file \\fsnl\gpodiverse\Teams\Install-MicrosoftTeams.ps1
or
installer
{PackageShare}\powershell.exe -executionpolicy bypass -file \\fileshare\Teams\Install-MicrosoftTeams.ps1
The goal is to install a softwarepackager on some clients which is a msi file and i would like to do this with powershell thru Lansweeper.
Labels:
- Labels:
-
General Discussion
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 03:09 AM
This works perfectly fine for me.
Installer Type Cpmmand
powershell.exe -executionpolicy bypass -file "{PackageShare}\CleanUpMGRScript.ps1"
Installer Type Cpmmand
powershell.exe -executionpolicy bypass -file "{PackageShare}\CleanUpMGRScript.ps1"

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 11:17 AM
CyberCitizen wrote:
This works perfectly fine for me.
Installer Type Cpmmand
powershell.exe -executionpolicy bypass -file "{PackageShare}\CleanUpMGRScript.ps1"
I have made a exe from the ps1 and try to execute that with Lansweeper.
I get an error on the client that there is something with the CAB file and that it cannot extract it problebly not enough memory or something but tis is new pc with enough memory?
The message is from LSdeployment\remotedeployment_x64.exe

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 06:12 PM
You would need to save the PowerShell script on your Lansweeper server in the package share folder. In the deployment you should be able to use the following command: powershell.exe -executionpolicy bypass -file "{PackageShare}\Install-MicrosoftTeams.ps1"
