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: 114  
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: 415  
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 Helpdesk API
by  scoops98   Go to last post Go to first unread
Last post: Today at 11:53:30 AM(UTC)
Lansweeper Lansweeper custom report
by  Hendrik.VE   Go to last post Go to first unread
Last post: Today at 10:52:03 AM(UTC)
Lansweeper Total License Utilization
by  Hendrik.VE  
Go to last post Go to first unread
Last post: Today at 10:31:05 AM(UTC)
Lansweeper Office 365 Scanning-enabled accts not linked\accessible?
by  Mark F   Go to last post Go to first unread
Last post: Today at 2:55:09 AM(UTC)
Lansweeper Helpdesk navigation
by  jra0500  
Go to last post Go to first unread
Last post: Yesterday at 3:21:55 PM(UTC)
Lansweeper Asset Radar and external/remote IPs
by  gadgetrants   Go to last post Go to first unread
Last post: Yesterday at 5:25:05 AM(UTC)
Lansweeper Recording history of IP address for device
by  Steven R  
Go to last post Go to first unread
Last post: Yesterday at 1:58:33 AM(UTC)