Adding Endpoint Privilege Manager Agent to Standard, or Golden OS image
Objective
NOTE - For non-persistent VDI additional info see the following Article: https://community.cyberark.com/s/article/00003942
Environment
25.8
Procedure
If you want to create an image of a system with the EPM Agent installed and then to deploy it across the network in your business environment, you should create the image on the host where the Agent-ID has been removed from the registry. This will help you to avoid issues with identification of computers by the EPM Server.
-----------------
Please note: VMWare Instant Clones methodology re-clones 'live' agents/endpoints, instead of the original master. This causes the duplication of these agents ID, preventing them from being visible in the console. This is currently a limitation with deploying EPM agents using golden image in this environment.
-----------------
-
Instructions for Creating the Agent’s Golden Image
-
Install the agent on the PC with the Operating System image.
-
Choose a preparation method:
-
Automatic (Beta): Use the attached script and run as Administrator.
-
Manual: Follow steps 3–7 below.
-
-
(Manual) Shutdown the agent self-defense if enabled.
You can verify the agent's self-defense protection status using the following Windows command: sc query vfpd-
Instructions: https://docs.cyberark.com/epm/latest/en/content/policies/protecting%20agents.htm#Generateasecuretoken
-
Command line (run in agent folder):
vf_agent.exe -UseToken XXXXX
vf_agent.exe -StopPasServ
vf_agent.exe -StopServ
-
-
Remove the Trace folder:
C:\Program Files\CyberArk\Endpoint Privilege Manager\Agent\Trace\ -
Remove the policies file:
C:\Program Files\CyberArk\Endpoint Privilege Manager\Agent\Config\vf_policies.xml -
Remove Agent ID from registry:
-
Open Registry Editor →
HKEY_LOCAL_MACHINE\SOFTWARE\Viewfinity\Agent -
Delete the
Agent-IDkey. -
This ensures a new Agent ID is created when the agent starts as NP-VDI.
-
-
Generate the image of the PC.
-
-----------------
Following recent issues with Azure Virtual Desktop (VDI), please note that golden image machines may be reset multiple times.
To prevent the EPM Agent from starting prematurely during the image preparation process, you must remove the agent from the auto-start list before capturing the image.
Registry Path: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Remove the entry for: vf_agent.exe
After the image has been deployed and a new user account has been created and logged in, you will then need to re-enable or add the process to auto-start and generate the agent ID to connect to our servers.
* The information provided applies only to Agents version 26.4 and earlier.
Additional Information
Details
EPM agent generates a unique agent ID which is required to communicate with the EPM Server. Follow the procedure below to include the EPM agent in your standard OS image.
If you want to create an image of a system with the EPM Agent installed and then to deploy it across the network in your business environment, you should create the image on the host where the Agent-ID has been removed from the registry. This will help you to avoid issues with identification of computers by the EPM Server.
- Install the agent on the PC with the Operating System image by taken the setup file from the My Computers > Download Agent Installation page of the Manager UI.
- Shutdown the agent self defense if self defense is turned on (if agent self defense is turned off then skip this step).
- By EPM console, at the computer configuration page(delete the password there for the specific image machine, then update your policies)
- By command line
- Open CMD, run the command (under the agent folder) vf_agent.exe -UseToken XXXXX
- Token can be generated in the Computers/Uninstall window in EPM console
- At the same CMD window run vf_agent.exe -StopPasServ
- At the same CMD window run vf_agent.exe -StopServ
- Remove content of Trace folder (there should only be one of the following):
- Legacy Viewfinity File Location - C:\Program Files\Viewfinity\Agent\Trace
- Legacy Idira File Location for 5.x - C:\Program Files\CyberArk\Viewfinity\Agent\Trace\
- Idira File Location for 6.0+ - C:\Program Files\CyberArk\Endpoint Privilege Manager\Agent\Trace\ or C:\Program Files\CyberArk\Endpoint Privilege Manager\Agent\Config\vf_policies.xml
- Open registry editor and navigate to:
- HKEY_LOCAL_MACHINE\SOFTWARE\Viewfinity\Agent
- Remove Agent-ID key from registry before you create an image, so that the image does not contain Agent ID, a new one will be created once the agent comes up as a new NP-VDI
- Generate an image of PC