Notification

Icon
Error

Powershell script deployment - Powershell script deployment

Posted: Wednesday, February 17, 2021 3:54:24 PM(UTC)
cstoop

cstoop

Member Original PosterPosts: 4
0
Like
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.
Brandon
#1Brandon Member Posts: 90  
posted: 2/17/2021 6:12:33 PM(UTC)
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"
CyberCitizen
#2CyberCitizen Member Posts: 409  
posted: 2/19/2021 3:09:34 AM(UTC)
This works perfectly fine for me.

Installer Type Cpmmand
powershell.exe -executionpolicy bypass -file "{PackageShare}\CleanUpMGRScript.ps1"
cstoop
#3cstoop Member Original PosterPosts: 4  
posted: 2/19/2021 11:17:08 AM(UTC)
Originally Posted by: CyberCitizen Go to Quoted Post
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


Active Discussions

Lansweeper Asset management/replacement
by  RC62N   Go to last post Go to first unread
Last post: 2/26/2021 6:30:22 PM(UTC)
Lansweeper Turn off graphical report builder
by  Tenacious   Go to last post Go to first unread
Last post: 2/23/2021 7:53:03 PM(UTC)
Report Center Reference software list
by  DeviantTomato   Go to last post Go to first unread
Last post: 2/23/2021 1:16:48 PM(UTC)
Lansweeper Report Filtering Uptime
by  CyberCitizen  
Go to last post Go to first unread
Last post: 2/22/2021 12:28:22 AM(UTC)
Lansweeper Adobe Report for CVE-2021-21017
by  baycrest   Go to last post Go to first unread
Last post: 2/10/2021 2:27:57 PM(UTC)
Lansweeper Need help with two reports
by  Andy.S  
Go to last post Go to first unread
Last post: 2/10/2021 10:15:42 AM(UTC)