CyberArk Rest API's installation Beginners Guide

What is psPAS

psPAS is Community Developed PowerShell Module for the CyberArk REST API.

It was developed by Pete Maan.

In order to install or set up the psPAS module in PowerShell you can follow the below steps.

  • Login to the server where you want to install it.
  • Open PowerShell as administrator.
  • Execute the below commands step-wise step

Prerequisites for psPAS module installation

  • PowerShell Core, or Windows Powershell v5 (minimum)
  • CyberArk PAS REST API/PVWA Web Service (available and accessible over HTTPS using TLS 1.2)
  • A user who can authenticate and has the necessary Vault/Safe permissions.

Users can download psPAS from PowerShell Gallery or GitHub.

Users can choose any of the following ways to download the module and install it.

Users can any of the options to install psPAS on the PowerShell module

Method 1: Install from PowerShell Gallery

This is the easiest and most popular way to install the module.

  1. Open a PowerShell prompt
  2. Execute the following command:
Install-Module -Name psPAS -Scope CurrentUser

Method 2: Manual Installation

For manual installation of psPAS, Module files can be manually copied to one of your PowerShell module directories.

use the following command to get the paths to your local PowerShell module folders:


The module files must be placed in one of the listed directories, in a folder called psPAS.

The module files are available to download using a variety of methods:

Save-Module -Name psPAS -Path C:\temp
  • Copy the C:\temp\psPAS folder to your “Powershell Modules” directory of choice.

Refer this article to learn more about PSModulePath

Download Method 2: psPAS Release

Download Method 3: psPAS Branch

  • Download GitHub Branch
    • Unblock & Extract the archive
    • Copy the psPAS (\<Archive Root>\psPAS-master\psPAS) folder to your “Powershell Modules” directory of choice.

Verification of psPAS installation

Validate Install:

Get-Module -ListAvailable psPAS

Import the module:

Import-Module psPAS

List Module Commands:

Get-Command -Module psPAS

Get detailed information/help on specific commands:

Get-Help New-PASUser -Full

How to Use PsPAS for Safe Creation

  • Go to the PsPAS directory “C:\Users\xyz\epv-api-scripts-main\Safe Management\”, open PowerShell, and run these commands
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypas
Import-Module psPAS
New-PASSession -Credential $cred -BaseURI -type CyberArk
Whenever it prompts for user id enter any one of the vault admin id
Username: Admin ID(Use any one of the vault admin id)
  • Under “C:\Users\xyz\epv-api-scripts-main\Safe Management” folder, prepare CSV file for safe creation
  • Open PowerShell and run these commands
.\Safe-Management.ps1 -PVWAURL "" -Add -FilePath "C:\Users\xyz\epv-api-scripts-main\Safe Management\safe-details_and_members.csv"

How to Add Safe Members using PsPAS

  • Go to the PsPAS Safe management directory “C:\Users\xyz\epv-api-scripts-main\Safe Management” folder, prepare a CSV file for safe member addition
  • Open PowerShell and run these commands
.\Safe-Management.ps1 -PVWAURL "" -Update -FilePath "C:\Users\xyz\epv-api-scripts-main\Safe Management\safe-members-sample.csv"

By Editorial Team

CyberSecurity is an independent cybersecurity research and reviews website to help organizations research and find the right solutions to solve their business problems.

Leave a Reply

Your email address will not be published. Required fields are marked *