Skip to content

Undefined variable in Link-Accounts.ps1 code. #472

@f-mettling

Description

@f-mettling

Summary

Just would like to inform about one little typo error in Link-Accounts.ps1 script on line 706. Variable csvPathBad is not initiated before and result in error during PowerShell execution. We may consider replacing by badAccounts instead.

Steps to Reproduce

  1. Run script in PowerShell and get systematic error like :

| Remove-Item $csvPathBad -Force -ErrorAction SilentlyContinue
| ~~~~~~~~~~~
| Cannot bind argument to parameter 'Path' because it is null.


Expected Results

N/A

Actual Results

| Remove-Item $csvPathBad -Force -ErrorAction SilentlyContinue
| ~~~~~~~~~~~
| Cannot bind argument to parameter 'Path' because it is null.

Reproducible

  • Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

https://github.com/cyberark/epv-api-scripts/blob/main/Linked%20Accounts/Link-Accounts.ps1
Version April 2025

Environment setup

N/A

Additional Information

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions