Notification

Icon
Error

Run a PowerShell script file in a client computer - I have a ps1 file which copy data from A - B, need to run the PowerShell file

Posted: Thursday, October 21, 2021 12:55:49 PM(UTC)
RIC

RIC

Member Original PosterPosts: 2
0
Like
Please assist - I have a ps1 file that copies data from A - B, need to run the PowerShell file using lansweeper on multiple pc's. Can you please advise methods to do this? If I am doing it right so far, what do I put after {PackageShare} under Install File in Edit Steps? Exported XML is attached. But this doesn't work.
RIC attached the following image(s):
Lan.PNG
test-copyDownload Package
Description
Final ActionNothing
Max. Duration5 min(s), 0 hour(s)
RescanNo
Steps
1. copy-test
TypeInstaller
Return Codes 0,1641,3010
SuccessStop (Success)
FailureStop (Failure)
Command "{PackageShare}C:\temp\copy.ps1" /s
looktall
#1looktall Member Posts: 8  
posted: 11/2/2021 3:14:26 AM(UTC)
If i'm following correctly what you're trying to do you would use the command action, not installer.

Using the below command.

Code:
Powershell.exe -executionpolicy bypass -file "{PackageShare}\copy.ps1"


This will run the referenced ps file on the remote computer.

Active Discussions

Lansweeper Marking/Flagging VIP Customers
by  C Johnson   Go to last post Go to first unread
Last post: Yesterday at 11:43:22 PM(UTC)
Lansweeper Office 2016 key scanning
by  WaldoIT  
Go to last post Go to first unread
Last post: Yesterday at 3:40:41 PM(UTC)
Lansweeper Configuring SSL in IIS Express issue
by  saffo   Go to last post Go to first unread
Last post: Yesterday at 9:57:31 AM(UTC)
Lansweeper MDM Jamf School
by  Eugene  
Go to last post Go to first unread
Last post: 12/3/2021 6:21:44 PM(UTC)
Lansweeper HTTPS not secure
by  Luke Maslany   Go to last post Go to first unread
Last post: 12/3/2021 2:23:28 PM(UTC)
Lansweeper Problem with deploy software
by  Max90  
Go to last post Go to first unread
Last post: 12/3/2021 2:04:12 PM(UTC)
Lansweeper scanning target by range
by  Colombini   Go to last post Go to first unread
Last post: 12/3/2021 12:06:19 PM(UTC)
Lansweeper Log WIFI networks
by  BastiOn  
Go to last post Go to first unread
Last post: 12/3/2021 10:29:38 AM(UTC)