cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deploying an uninstall script

Dmyers
Engaged Sweeper

Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (internal\svc_mailer). ShareCredential: (LansweeperUser).
Command: powershell.exe -executionpolicy bypass -file "\\USWASPUTIL03\Lansweeper\PackShare\Scripts\Uninstall_Cleanup_EPP_EDR.ps1" -safemode No -attempteduninstall Yes

 

Can someone help me figure out what im doing wrong? We are trying to test this with 1 device but our goal is to push it to all our device in our org. 

4 REPLIES 4

Dmyers
Engaged Sweeper

So i figured out how to get it to work. But now the issue is every time i push the script i get it timed out. Is there anyway to track down why it is getting timed out. I have testing the script on my device and it works just fine. But anytime i push it from lansweeper it sits and then times out. 

Obi_1_Cinobi
Lansweeper Tech Support
Lansweeper Tech Support

Hello there!

 

In most cases, an incorrect function indicates that the command being used has some kind of syntax issue or there is an issue with accessing the referenced file. There are other possible reasons though.

We recommend the following:

  • Consulting the relevant vendor's documentation to verify the parameters and command syntax that should be used.
  • Testing the command in a local CMD under similar circumstances first. A command that is functional in a local CMD should be functional in the deployment module.
  • Go to Deployment\Security Options and double-check that both the package share and package share credentials are valid and correct. Incorrect values here have been known to cause incorrect function issues.
  • Make sure that the installer is present in the specified folder on your share. By default, this is the Program Files (x86)\Lansweeper\PackageShare\Installers folder on your Lansweeper server. But you seem to be using a custom share.
  • For a more accurate test, do the following in a local CMD on the test computer:
    • Map your packageshare as a drive using your packageshare credentials, using net use https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/gg...
    • Copy the result command from your deployment logs and replace \\USWASPUTIL03\Lansweeper\PackShare\ with the drive letter you've mapped your package share to.
    • Run CMD as your Run Mode user, e.g. run it as Administrator if your run mode user was the Local System account.
    • Paste the modified result command and check the result.

Do note that the commands and parameters used for deployment packages can vary greatly depending on the environment they're used in, the publisher of the software being deployed, etc. As such we can only provide limited support in troubleshooting custom deployment packages. 

This is what i am getting now. and this is the script

Obi_1_Cinobi
Lansweeper Tech Support
Lansweeper Tech Support

Hello there!

The message "package timeout reached" indicates that your package did not finish within the time you defined as the Max Duration for the deployment package. This can happen because:

  • There was no Stop(Success) and no Stop(Failure) defined as the next action in the last step of the package. You can change your deployment steps when you select the package under Deployment\Packages.
  • The execution of the steps took longer than the Max Duration defined for the package. You can increase the Max Duration when you select the package under Deployment\Packages.
  • User interaction was required during the package execution, e.g. the user was required to confirm a dialog or close an application.
  • The computer froze or started rebooting before giving back a result for the last package step.

We recommend that you review your package and manually test each step on a target machine. Copy the Command of your step and manually run it in Command Prompt on a target machine to see if it works. Replace {packageshare} with the UNC path of your package share as defined under Deployment\Security Options. This should help you identify the cause of the issue. Only when the command works silently and within the allotted time in Command Prompt will it work in Lansweeper as well.