EPM Uninstall Using Remote Powershell

EPM Uninstall Using Remote Powershell

93
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:08 PM


Objective


Many customers use a remote PowerShell shell to perform actions on endpoints without bothering end users.  Running some EPM commands can be an issue due to the placement of quotation marks.  Here is how to run several commands remotely.

Environment


22.12;23.4;23.6;23.8 EPM Windows Agent

Procedure


1) Connect to the computer remotely using PowerShell

2) Optional - run this command to get the status of Agent Self Defense before making changes
get-service vfpd

3) Try to stop Agent Self Defense with the following command.  Replace the token with your actual token.  Note that double quotation marks "" are needed as shown below:

Start-Process cmd -ArgumentList "/C ""C:\Program Files\CyberArk\Endpoint Privilege Manager\agent\vf_agent.exe"" -UseToken 1ABCEXAMPLETOKEN4567891011121314"

4) Optional - run this command to get the status of Agent Self Defense after the stop attempt

get-service vfpd

if it's still running, that means step 3 failed and you can stop here.  Otherwise proceed below:

5) Run another command to uninstall EPM.  In this example I'm using an example of uninstalling using the GUID for version 23.8.0.1415.  You'll need to either replace the GUID with the GUID for your version, or use the msiexec method that involves using the msiexec file instead

Start-Process cmd -ArgumentList "/C MsiExec.exe /x {003B1BE5-373A-49B5-8834-D7B6715EB98B} /qn"

6) You can check the following service to confirm if EPM was removed. 
get-service vfdrv


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001SqKCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail