- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-21-2026 09:22 PM
Hi everyone,
I am having multiple un-link accounts in my setup and i would like to do it but not manually.
I found this script from GitHub: https://github.com/cyberark/epv-api-scripts/tree/main/Linked%20Accounts
But not sure that it is suitable for version 14.2 i use cause i am getting this error logs:
.\Link-Accounts.ps1 -PVWAURL cyberark.xxxxxx.xx -CSVPath "C:\Users\\CBA\API\epv-api-scripts\Linked Accounts\Link-Accounts.csv" -AuthType cyberark -concurrentSession
=======================================
Welcome to the Account Link Utility
------------------------------------
Getting PVWA Credentials to start Linking accounts
Join-ExceptionMessage : Cannot process argument transformation on parameter 'e'. Cannot convert the "System.Exception: Get-LogonHeader: ---> System.Management.Automation.RuntimeException: Unable to find type
[Microsoft.PowerShell.Commands.HttpResponseException].
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
--- End of inner exception stack trace ---" value of type "System.Exception" to type "System.Management.Automation.ErrorRecord".
At C:\Users\\CBA\API\epv-api-scripts\Linked Accounts\Link-Accounts.ps1:693 char:86
+ ... -MSG "Error Logging on. Error: $(Join-ExceptionMessage $_.Exception)"
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Join-ExceptionMessage], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Join-ExceptionMessage
Importing accounts to link
Remove-Item : Cannot bind argument to parameter 'Path' because it is null.
At C:\Users\CBA\API\epv-api-scripts\Linked Accounts\Link-Accounts.ps1:706 char:13
+ Remove-Item $csvPathBad -Force -ErrorAction SilentlyContinue
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Remove-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.RemoveItemCommand
Found a total of 1 accounts with links
A total of 0 ExtraPass1 accounts found
A total of 0 ExtraPass2 accounts found
A total of 1 ExtraPass3 accounts found
A total of 1 account links found
Starting to add links to 1 master accounts
Searching for Master Account with username "XX.CBA.ACCESS.USER05" with address "XX-VWL5286.XXXX.NET" in safe "ACESSCARD".
System.Management.Automation.RuntimeException: Unable to find type [Microsoft.PowerShell.Commands.HttpResponseException].
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Error searching for Master Account with username "XX.CBA.ACCESS.USER05" with address "XX-VWL5286.XXXX.NET" in safe "ACESSCARD".
Message: No Master Account Found
concurrentSession passed, session NOT logged off
A total of 0 accounts with 1 links imported
A total of 0 ExtraPass1 links out of 0 links where created successfully.
A total of 0 ExtraPass2 links out of 0 links where created successfully.
A total of 0 ExtraPass3 links out of 1 links where created successfully.
A total of 0 individual links out of 1 links where created successfully.
But the account is clearly exists and i can access with the account that i use to run this script.
05-05-2026 02:47 PM
I think the error happens before the script interacts with any account in your Vault - from the output you posted, the script isn't even logging on to your PVWA server.
One potential problem: The script wants the PVWA URL as the actual URL, meaning something like this:
-PVWAURL "https://cyberark.company.local/PasswordVault"I think you are specifying only the hostname part ("cyberark.company.local" or similar).
Another potential issue is that the credentials you provide are wrong.
I don't think the double-backslashes in the path are an issue, PowerShell is usually pretty smart about still recognizing the intended path.
04-28-2026 10:27 AM
Hey @Quang Le
It looks like it should work, but it's having trouble finding the master account name.
Does the account name start with a special character? Can you attempt it with a test account with a simple name to see if the same error occurs?
-Matt
04-29-2026 12:13 AM
Hi @Matt Jennison ,
I don't really sure what is the master account that the script looking for? Was it the account in the picture that i posted? If so, the account just start with capital letter. Yeah, let me try with account that is more simple.
04-29-2026 05:29 AM
the master account would be the account you want to link the reconcile account to.
Let me know how things go!
-Matt
05-04-2026 01:29 AM
Hi @Matt Jennison ,
I have tried to create new account with username is "test" and try again but no luck. Still the same error message:
.\Link-Accounts.ps1 -PVWAURL cyberark.xxxxxxxx.xx -CSVPath "C:\Users\\Link-Accounts.csv" -AuthType cyberark -concurrentSession
=======================================
Welcome to the Account Link Utility
------------------------------------
Getting PVWA Credentials to start Linking accounts
Join-ExceptionMessage : Cannot process argument transformation on parameter 'e'. Cannot convert the "System.Exception: Get-LogonHeader: ---> System.Management.Automation.RuntimeException: Unable to find type
[Microsoft.PowerShell.Commands.HttpResponseException].
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
--- End of inner exception stack trace ---" value of type "System.Exception" to type "System.Management.Automation.ErrorRecord".
At C:\Users\\epv-api-scripts\Linked Accounts\Link-Accounts.ps1:693 char:86
+ ... -MSG "Error Logging on. Error: $(Join-ExceptionMessage $_.Exception)"
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Join-ExceptionMessage], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Join-ExceptionMessage
Importing accounts to link
Remove-Item : Cannot bind argument to parameter 'Path' because it is null.
At C:\Users\\epv-api-scripts\Linked Accounts\Link-Accounts.ps1:706 char:13
+ Remove-Item $csvPathBad -Force -ErrorAction SilentlyContinue
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Remove-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.RemoveItemCommand
Found a total of 1 accounts with links
A total of 0 ExtraPass1 accounts found
A total of 0 ExtraPass2 accounts found
A total of 1 ExtraPass3 accounts found
A total of 1 account links found
Starting to add links to 1 master accounts
Searching for Master Account with username "test" with address "xxxxxxxxx.net" in safe "Jira_support_xx".
System.Management.Automation.RuntimeException: Unable to find type [Microsoft.PowerShell.Commands.HttpResponseException].
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Error searching for Master Account with username "test" with address "xxxxxxxxxxx.net" in safe "Jira_support_xx".
Message: No Master Account Found
concurrentSession passed, session NOT logged off
A total of 0 accounts with 1 links imported
A total of 0 ExtraPass1 links out of 0 links where created successfully.
A total of 0 ExtraPass2 links out of 0 links where created successfully.
A total of 0 ExtraPass3 links out of 1 links where created successfully.
A total of 0 individual links out of 1 links where created successfully.
05-05-2026 05:57 AM
Hey @Quang Le
Honestly, I'm not quite sure why this wouldn't be working right now.
Do you have this process working on another account? If so, you can review these settings to see what may differ within this setup.
-Matt
05-05-2026 11:17 AM
Hello,
In several places in the posted logs there seems to be an extra backslash in the path for the CSV file. The process appears to be failing on the path so I would focus on fixing that first.
05-05-2026 02:47 PM
I think the error happens before the script interacts with any account in your Vault - from the output you posted, the script isn't even logging on to your PVWA server.
One potential problem: The script wants the PVWA URL as the actual URL, meaning something like this:
-PVWAURL "https://cyberark.company.local/PasswordVault"I think you are specifying only the hostname part ("cyberark.company.local" or similar).
Another potential issue is that the credentials you provide are wrong.
I don't think the double-backslashes in the path are an issue, PowerShell is usually pretty smart about still recognizing the intended path.
05-05-2026 04:56 PM
Hi @Bernhard Brückler , i will try but in the output log it saids "Found a total of 1 accounts with links" If it isn't even logging on to my PVWA server, how can it find the account with links?
05-05-2026 04:57 PM
Hi, thank you but it just because i remove it myself to not expose private data.
05-05-2026 04:59 PM
Hi i don't understand what you mean about "have this process working on another account?"
Btw, i then write a python script to use REST API to link and it works perfectly. Just want to know why it isn't work with the tool provide by CyberAk.
05-06-2026 06:42 AM
Because the script gets that info from the CSV file.
05-06-2026 08:29 PM
Hi @Bernhard Brückler , you got it right. I test and it is working.
The URL must be something like: https://cyberark.company.local/PasswordVault
Not:
Even those other URL still pop-up login but it doesn't working. Always have to be https://cyberark.company.local/PasswordVault
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

