/build/static/layout/Breadcrumb_cap_w.png

Trying to uninstall and install an older version agent via script

I know how this may sound weird, but here goes.  We currently have around 200 machines that use File Synchronization.  We were using the 10.0 agent with no issue.  I made the silly mistake of having them auto update to 11.0 (Beta, I know).  However, when that happened, the file sync is now intermittent and deleting random files every time that the devices check in.  


Now to the fun part.... I am trying to uninstall KACE and reinstall, through KACE.  I know that sounds really weird, but hear me out.  I created a batch file stored outside of the KACE install location.  I then used a script to call on the batch file (which I should think would run all the way through.)  However, when I get to the part where KACE is uninstalled, I believe it stops.  I'm guessing it is because KACE somehow is hosting the batch file.  I'm not exactly sure if that is what is happening.  I am wondering if anyone else has experience with this and what they have done.  I would rather not have to roll back by manually uninstalling/reinstalling the agent on around 200 machines.


Again, this is what I did... Put batch files and other files synced to a location outside of the KACE installation.  Call the batch file (not in KACE) from a script.  Batch file gets to where KACE is uninstalled and then stops.  Anyone have any similar things that they have done that have worked?


0 Comments   [ + ] Show comments

Answers (3)

Posted by: zgillette 3 years ago
Fourth Degree Green Belt
0

I ended up using Lansweeper (a different tool) to uninstall and reinstall it.

Posted by: PaulGibson 4 years ago
Orange Belt
0

I believe the problem is that the batch file runs under the context of the KACE agent, so when the KACE agent is uninstalled it kills any processes it started. I don't think trying to use KACE to uninstall the beta agent and install the stable one will work.

I frequently use PowerShell remoting to connect to computers using the command line. If your computers are in Active Directory, it's not hard to setup a Group Policy to enable remoting. Take a look at this site:

https://www.techrepublic.com/article/how-to-enable-powershell-remoting-via-group-policy/

If you get remoting working, then you can use KACE to push your uninstall/install batch file to the clients, then use PowerShell to run the batch file. If the filename is 

C:\Windows\Temp\Install-OldKACEAgent.bat

You could use PowerShell like this

$Computers = 'computer1.domain.local', 'computer2.domain.local', 'computer3.domain.local'
Invoke-Command -ComputerName $Computers -Script {C:\Windows\Temp\Install-OldKACEAgent.bat}

If you don't know PowerShell or use remoting, I recommend you learn a bit about both. With 200 computers, it could be a worthwhile investment of your time.



Comments:
  • That is what I figured. That's actually a great way to do it! Thank you! I actually finally tried out Lansweeper, which we had for years to do it. It worked out great for deployment. - zgillette 4 years ago
Posted by: Nico_K 4 years ago
Red Belt
0

to replace the agent via script the script needs to be an offline script, since the agent needs to be stopped for the installation.

But since this is a BETA, I _URGENTLY_ suggest you to contact the beta team with the email you got to analayze and fix it. This is what a Beta is for. With simply uninstalling it it does not help. Since it may be that others run into this issue too and a fixed agent would fix the issue.


Comments:
  • Thanks Nico. I have been in contact with the BETA team about it. We even had a call about it. Sadly, timing was not on the BETA's side. We successfully rolled it back using another tool we have called Lansweeper. It's good to know we have some other tools in our arsenal. - zgillette 4 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ