PSM - Problem to view Windows session: FAILED TO INITIATE WINDOWS SESSION AUDIT

PSM - Problem to view Windows session: FAILED TO INITIATE WINDOWS SESSION AUDIT

550
Created On 11/10/26 11:00 AM - Last Modified 11/10/26 13:05 PM


Symptom


PSM Connection to target Windows server works, but auditor fails to view the detailed session.
When selecting the session you get the error: FAILED TO INITIATE WINDOWS SESSION AUDIT

 


Environment


8.1;v8.2;v8.5;v8.6;v9.0;v9.1;v9.2;9.3;9.5;9.6;9.7;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0 PAS
PSM


Cause


The PSM detailed Windows Audit feature is using a light-weight agent which must be copied temporarily during the session to the target Windows server.
 
The file is called PSMWinAgent.exe
The copy fails due to one or more of the following :
  1. You don't have permissions on the target server with the user that logged on to the Target machine
     
  2. Target server Firewall blocks communication. You might see the following in the PSM logs:
    PSMOS003E Failed to copy [C:\Program Files (x86)\CyberArk\PSM\Components\PSMWinAgent.exe] to remote machine resource [\\<machine-address>\admin$\PSMWinAgent.exe] (System error [5]: Access is denied.) (Codes: -1, 5)
     
  3. File and Printer Sharing for Microsoft Networks is not enabled. You might see the following in the PSM logs:
    PSMRD123E An error occurred while trying to deploy audit agent. Reason: PSMRD133E Failed to copy audit agent to the target machine. Reason: PSMOS002E Failed to authenticate to remote Windows machine resource [\\<mcahine-address>\IPC$] (Codes: 4) (System error [67]: The network name cannot be found.)
     
  4. You might see something similar in the component <sesisonID>.RDP.LOG file: PSMRD123E An error occurred while trying to deploy audit agent. Reason: PSMRD133E Failed to copy audit agent to the target machine. Reason: PSMOS003E Failed to copy [C:\windows\SysWOW64\msvcr120.dll] to remote machine resource [\\<target server address>\admin$\System32\msvcr120.dll] (System error [67]: The network name cannot be found.)


Resolution


 
  1. Test the PSM Connect with a Local Administrator, which has all the permissions.
    1. If the target account is not a local administrator on the target machine, the out-of-box PSMWinAudit agent will not function properly. Idira R&D has developed a community version of this audit agent that works using least privilege model which allows non-administrator target accounts to still leverage the PSM Windows Audit functionality.
    2. This new agent can be downloaded from the Idira Marketplace. This agent will need to be manually installed on all target servers that will be connected to via PSM in order to function:
      1. PSM WinAudit Local Agent
  2. Configure the Target machine host firewall to Allow the copy operation.
  3. Enable File and Printer Sharing service.
    1. The PSM will need to be able to access \\ADMIN$  (which is typically C:\Windows) on the target machine using the target account. The PSM attempts to perform a network file copy of the PSMWinAudit.exe agent from PSM to this location on the target during the start of the PSM session.
    2. The PSM may also need access to \\ADMIN$\Syswow64 on 64 bit target machines in order to copy two dependent DLLs for the audit agent.
    3. NOTE - if using the "PSM WinAudit Local Agent" least privileges agent from the Marketplace, access to the ADMIN$ share won't be required because you'll need to manually install the agent ahead of time on each target server.
  4. Administrative shares are used in windows to remotely access and manage a computer. If you open the computer management console (compmgmt.msc), expand...
System Tools > Shared Folders > Share
  • You should see the admin$ share, if it is missing referencing this Microsoft article:
  • https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/problems-administrative-shares-missing

Other Possible Root Causes:
  1. Disable UAC on Target server.
  2. When connecting to a target server with PSM, when prompted to enter the remote machine name, ensure you use a fully qualified DNS name for the connection and not an IP address.
Note for UAC:
If you are attempting to access (either with PDQ Inventory or PDQ Deploy) a Windows 7, Windows 8, Vista or Server 2008 computer you may get the "Access Denied - Failed to connect to ADMIN$ share" error, even when supplying the appropriate local user credentials that have Administrator access. If the target computer is not a member of a Windows 2003 or later Domain then this is most likely because the target system has Remote UAC enabled. Remote UAC prevents local administrative accounts from accessing ADMIN$ (more appropriately Remote UAC prevents local accounts from running in an elevated mode when connecting from the network).

If you need to be able to access the ADMIN$ using a local account then you will need to disable Remote UAC.


Additional Information


Details

SYMPTOM:

The PSM Connection to target Windows server works, but auditor fails to view the detailed session.
When selecting the session you get the error: FAILED TO INITIATE WINDOWS SESSION AUDIT

 
 
 
 
 
 
 
 
PROBLEM: 
The PSM detailed Windows Audit feature is using a light-weight agent which must be copied temporarily during the session to the target Windows server.
The file is called PSMWinAgent.exe
 
 
The copy fails due to one or more of the following :
  1. You don't have permissions on the target server with the user that logged on to the Target machine
  2. Target server Firewall blocks communication. You might see the following in the PSM logs:
    PSMOS003E Failed to copy [C:\Program Files (x86)\CyberArk\PSM\Components\PSMWinAgent.exe] to remote machine resource [\\<machine-address>\admin$\PSMWinAgent.exe] (System error [5]: Access is denied.) (Codes: -1, 5)
  3. File and Printer Sharing for Microsoft Networks is not enabled. You might see the following in the PSM logs:
    PSMRD123E An error occurred while trying to deploy audit agent. Reason: PSMRD133E Failed to copy audit agent to the target machine. Reason: PSMOS002E Failed to authenticate to remote Windows machine resource [\\<mcahine-address>\IPC$] (Codes: 4) (System error [67]: The network name cannot be found.)
  4. UAC on the target is blocking the PSM connecting to the target using the admin share

SOLUTION:
  1. Test the PSM Connect with a Local Administrator, which has all the permissions.
  2. Configure the Target machine host firewall to Allow the copy operation.
  3. Enable File and Printer Sharing service.
  4. There are two ways to resolve this
    1. Turn off UAC completely on the Target server, if this resolves the issue then it would be better to turn UAC back on and update the REG KEY mentioned below.
    2. Disable one of the settings which blocks remote connections, to do this a UAC setting needs to be enabled ('1') by adding a DWORD value of 'LocalAccountTokenFilterPolicy' to the following REG KEY:
      1. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\

Note for UAC:
 
If you are attempting to access (either with PDQ Inventory or PDQ Deploy) a Windows 7, Windows 8, Vista or Server 2008 computer you may get the "Access Denied - Failed to connect to ADMIN$ share" error, even when supplying the appropriate local user credentials that have Administrator access. Remote UAC prevents local administrative accounts from accessing ADMIN$, more appropriately Remote UAC prevents local accounts from running in an elevated mode when connecting from the network.
 
If you need to be able to access the ADMIN$ using a local account then you will need to disable Remote UAC which is mentioned in the solution above.



Actions
  • Print
  • Copy Link

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