Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PowerShell module for CyberArk Privileged Access Security REST API

License

NotificationsYou must be signed in to change notification settings

pspete/psPAS

Repository files navigation

psPAS

psPAS: PowerShell Module for the CyberArk API

Through the PVWA REST API, administer CyberArk PAS with PowerShell.

Contains all of the documented API capabilities up to CyberArk v14.0.

Docs:https://pspas.pspete.dev


Module Status

Master BranchLatest BuildCodeFactorCoveragePowerShell GalleryLicense
appveyortestscodefactorcodecovpsgallerylicense
releasegithubcoverallsdownloads

Usage

Logo

Authenticate

Everything begins with aLogon:

To submit a logon request to the CyberArk API, use the psPAS New-PASSession command.

All subsequent operations are carried out bypsPAS utilises the input data provided for theNew-PASSession request (URL, Certificate), as well as data received from the API after successful authentication (Authentication Token, PVWA Version).

CyberArk Authentication

  • Use a PowerShell credential object containing a valid vault username and password.
$cred=Get-CredentialPowerShell credential requestEnter your credentials.User: safeadminPasswordfor user safeadmin:**********New-PASSession-Credential$cred-BaseURI https://pvwa.somedomain.com

LDAP Authentication

  • Specify LDAP credentials allowed to authenticate to the vault.
$cred=Get-CredentialPowerShell credential requestEnter your credentials.User: xApprover_1Passwordfor user xApprover_1:**********New-PASSession-Credential$cred-BaseURI https://pvwa.somedomain.com-type LDAPGet-PASLoggedOnUserUserName    Source UserTypeName AgentUser Expired Disabled Suspended-----------------------------------------------------------xApprover_1 LDAP   EPVUser      False     False   False    False

RADIUS Authentication

$cred=Get-CredentialPowerShell credential requestEnter your credentials.User: DuoUserPasswordfor user DuoUser:**********New-PASSession-Credential$cred-BaseURI https://pvwa.somedomain.com-type RADIUS-OTP123456Get-PASLoggedOnUserUserName Source UserTypeName AgentUser Expired Disabled Suspended-----------------------------------------------------------DuoUser  LDAP   EPVUser      False     False   False    False

SAML Authentication

SAML SSO authentication using IWA and ADFS can be performed

New-PASSession-BaseURI$url-SAMLAuth

Where IWA SSO is not possible, thePS-SAML-Interactive module can be used to get the SAMLResponse from an authentication service.

The SAMLResponse received from the IdP is sent to complete saml authentication to the API.

import-module-name'C:\PS-SAML-Interactive.psm1'$loginURL='https://company.okta.com/home/app1/0oa11xddwdzhvlbiZ5d7/aln1k2HsUl5d7'$baseURL='https://pvwa.mycompany.com'$loginResponse=New-SAMLInteractive-LoginIDP$loginURLNew-PASSession-SAMLAuth-concurrentSession$true-BaseURI$baseURL-SAMLResponse$loginResponse

Certificate Authentication

  • Where PVWA/IIS requires client certificates, 'psPAS' will use any specified certificates for the duration of the session.

PKI Authentication Example:

Add-Type-AssemblyName System.Security# Get Valid Certs$MyCerts= [System.Security.Cryptography.X509Certificates.X509Certificate2[]](Get-ChildItem Cert:\CurrentUser\My)# Select Cert$Cert= [System.Security.Cryptography.X509Certificates.X509Certificate2UI]::SelectFromCollection($MyCerts,'Choose a certificate','Choose a certificate','SingleSelection')| select-First1New-PASSession-Credential$cred-BaseURI$url-type PKI-Certificate$Cert

Shared Authentication Example:

$Cert="0E199489C57E666115666D6E9990C2ACABDB6EDB"New-PASSession-UseSharedAuthentication-BaseURI https://pvwa.somedomain.com-CertificateThumbprint$Cert

Shared Services Authentication

Privilege Cloud Shared Services authentication flows require the pspeteIdentityCommand module, available from thePowershell Gallery &GitHub.

Identity User

Provide Identity User credentials and tenant details for authentication to CyberArk Identity for Privilege Cloud Shared Services:

#using URLNew-PASSession -IdentityTenantURL https://SomeTenantName.id.cyberark.cloud -PrivilegeCloudURL https://SomeTenant.privilegecloud.cyberark.cloud -Credential $Cred -IdentityUser
#using subdomainNew-PASSession -TenantSubdomain SomeTenantName -Credential $Cred -IdentityUser
Service User

Provide tenant ID and non-interactive API User credentials for authentication via CyberArk Identity for Privilege Cloud Shared Services:

New-PASSession -TenantSubdomain YourPrivilegeCloudTenantID -Credential $ServiceUserCreds -ServiceUser

Consult the vendor documentation for guidance on setting up a dedicated API Service user for non-interactive API use.

Basic Operations

Logo

Search

Safes
  • Get information relating to Safes you have access to:
Get-PASSafe-search _YZOSafeName           ManagingCPM     NumberOfDaysRetention NumberOfVersionsRetention Description----------------------------------------------------------------------------1_TestSafe_096_YZO PasswordManager3                         TestSafe: 1_TestSafe_096_YZO1_TestSafe_100_YZO PasswordManager3                         TestSafe: 1_TestSafe_100_YZO3_TestSafe_058_YZO PasswordManager3                         TestSafe: 3_TestSafe_058_YZO3_TestSafe_068_YZO PasswordManager3                         TestSafe: 3_TestSafe_068_YZO3_TestSafe_069_YZO PasswordManager3                         TestSafe: 3_TestSafe_069_YZO2_TestSafe_090_YZO PasswordManager3                         TestSafe: 2_TestSafe_090_YZO1_TestSafe_067_YZO PasswordManager3                         TestSafe: 1_TestSafe_067_YZO

Safe Members

  • Find Safe Members:
Get-PASSafeMember-SafeName 1_TestSafe_067_YZO-search UsrUserName                     SafeName           Permissions---------------------------ACC-G-1_TestSafe_067_YZO-Usr 1_TestSafe_067_YZO@{useAccounts=True;retrieveAccounts=True;listAccounts=True;addAccounts=False;.....
Users
  • Query for Vault Users:
Get-PASUser-Search xapID  UserName    Source UserType ComponentUser Location---------------------------------------------657 xApprover_A LDAP   EPVUser  False         \psPETE\Users658 xApprover_1 LDAP   EPVUser  False         \psPETE\Users659 xApprover_B LDAP   EPVUser  False         \psPETE\Users660 xApprover_2 LDAP   EPVUser  False         \psPETE\Users661 xApprover_C LDAP   EPVUser  False         \psPETE\Users662 xApprover_3 LDAP   EPVUser  False         \psPETE\Users
Accounts
  • Return Account data:
Get-PASAccount-SafeName"3_TestSafe_028_XYJ"-search sbwudlovAccountID                 :286_4Safe                      : 3_TestSafe_028_XYJaddress                   :SOMEDOMAIN.COMuserName                  : sbwudlovname                      : OperatingSystem-Z_WINDOMAIN_OFF-SOMEDOMAIN.COM-sbwudlovplatformId                : Z_WINDOMAIN_OFFsecretType                : passwordplatformAccountProperties :@{LogonDomain= SOMEDOMAIN }secretManagement          :@{automaticManagementEnabled= True;lastModifiedTime=1559864222 }createdTime               :06/06/201923:37:02
1st Gen API
  • Thekeywords &safe parameters ofGet-PASAccount force use of the 1st gen API:
Get-PASAccount-Safe 3_TestSafe_028_XYJWARNING:2 matching accounts found. Only the first result will be returnedAccountID          :286_3Safe               : 3_TestSafe_028_XYJFolder             : RootName               : OperatingSystem-Z_WINDOMAIN_OFF-SOMEDOMAIN.COM-kmgrsebfUserName           : kmgrsebfPlatformID         : Z_WINDOMAIN_OFFDeviceType         : Operating SystemAddress            :SOMEDOMAIN.COMInternalProperties :@{CreationMethod= PVWA }
  • Only details of the first found account will be returned.
  • More results can be returned by specifying alternative parameters to avoid sending the request via the 1st gen API
PS>Get-PASAccount-SafeName"3_TestSafe_028_XYJ"AccountID                 :286_3Safe                      : 3_TestSafe_028_XYJaddress                   :SOMEDOMAIN.COMuserName                  : kmgrsebfname                      : OperatingSystem-Z_WINDOMAIN_OFF-SOMEDOMAIN.COM-kmgrsebfplatformId                : Z_WINDOMAIN_OFFsecretType                : passwordplatformAccountProperties :@{LogonDomain= SOMEDOMAIN }secretManagement          :@{automaticManagementEnabled= True;lastModifiedTime=1559864221 }createdTime               :06/06/201923:37:01AccountID                 :286_4Safe                      : 3_TestSafe_028_XYJaddress                   :SOMEDOMAIN.COMuserName                  : sbwudlovname                      : OperatingSystem-Z_WINDOMAIN_OFF-SOMEDOMAIN.COM-sbwudlovplatformId                : Z_WINDOMAIN_OFFsecretType                : passwordplatformAccountProperties :@{LogonDomain= SOMEDOMAIN }secretManagement          :@{automaticManagementEnabled= True;lastModifiedTime=1559864222 }createdTime               :06/06/201923:37:02

Logo

Administration

Add An Account
  • Add an account to manage:
#Convert Password to SecureString$Password=ConvertTo-SecureString-String"Secret1337$"-AsPlainText-Force#Additional account details$platformAccountProperties=@{"LOGONDOMAIN"="domain.com""Notes"="Demo Account. Owner:psPete""Classification"="1F"}#Add AccountAdd-PASAccount-secretType Password-secret$Password-SafeName"YourSafe"-PlatformID"YourPlatform"`-Address"domain"-Username SomeUsername-platformAccountProperties$platformAccountProperties
Create Safes
  • Simple safe creation:
Add-PASSafe-SafeName NewSafe-Description"New Safe"-ManagingCPM PasswordManager-NumberOfVersionsRetention10SafeName ManagingCPM     NumberOfDaysRetention NumberOfVersionsRetention Description----------------------------------------------------------------------------NewSafe  PasswordManager10                        New Safe
Add Safe Members
  • Consistent safe membership:
Add-PASSafeMember-SafeName NewSafe-MemberName NewMember-UseAccounts$false-ListAccounts$true`-RetrieveAccounts$false-ViewAuditLog$true-ViewSafeMembers$trueUserName  SafeName Permissions---------------------------NewMember NewSafe@{useAccounts=False;retrieveAccounts=False;listAccounts=True;addAccounts=False;...
Update Accounts
  • Update values for individual account properties:
Set-PASAccount-AccountID286_4-op replace-path/address-valueNEWDOMAIN.COMAccountID                 :286_4Safe                      : 3_TestSafe_028_XYJaddress                   :NEWDOMAIN.COMuserName                  : sbwudlovname                      : OperatingSystem-Z_WINDOMAIN_OFF-SOMEDOMAIN.COM-sbwudlovplatformId                : Z_WINDOMAIN_OFFsecretType                : passwordplatformAccountProperties :@{LogonDomain=SOMEDOMAIN}secretManagement          :@{automaticManagementEnabled=True;lastModifiedTime=1559864222}createdTime               :06/06/201923:37:02Set-PASAccount-AccountID286_4-op replace-path/platformAccountProperties/LogonDomain-value NEWDOMAINAccountID                 :286_4Safe                      : 3_TestSafe_028_XYJaddress                   :NEWDOMAIN.COMuserName                  : sbwudlovname                      : OperatingSystem-Z_WINDOMAIN_OFF-SOMEDOMAIN.COM-sbwudlovplatformId                : Z_WINDOMAIN_OFFsecretType                : passwordplatformAccountProperties :@{LogonDomain=NEWDOMAIN}secretManagement          :@{automaticManagementEnabled=True;lastModifiedTime=1559864222}createdTime               :06/06/201923:37:02

Logo

CPM Operations
Verify
  • Verify passwords
# immediate verificationInvoke-PASCPMOperation-AccountID$ID-VerifyTask
Change
  • Change passwords for accounts or account groups
# immediate changeInvoke-PASCPMOperation-AccountID$ID-ChangeTask# immediate change to a specific password valueInvoke-PASCPMOperation-AccountID$ID-ChangeTask-ChangeImmediately$true-NewCredentials$SecureString# change password in the Vault onlyInvoke-PASCPMOperation-AccountID$ID-ChangeTask-NewCredentials$SecureString# change password for account groupInvoke-PASCPMOperation-AccountID$ID-ChangeTask-ChangeEntireGroup$true# change password for account group to a specific password valueInvoke-PASCPMOperation-AccountID$ID-ChangeTask-ChangeEntireGroup$true-NewCredentials$SecureString
Reconcile
  • Reconcile passwords
# immediate reconcileInvoke-PASCPMOperation-AccountID$ID-ReconcileTask
Import a Connection Component
  • Import Custom Connection Components:
Import-PASConnectionComponent-ImportFile C:\Temp\ConnectionComponent.zip
Platforms
  • Import & Export of CPM Platforms:
#Import a PlatformImport-PASPlatform-ImportFile C:\Temp\Platform.zip#Export a PlatformExport-PASPlatform-PlatformID"Some-SSH-Platform"-Path C:\Temp

Logo

Pipeline Operations

  • Work with the PowerShell pipeline:
#Find directory groups assigned to safesGet-PASSafe-search YZO|Get-PASSafeMember-memberType group-includePredefinedUsers$false|Where-Object {Get-PASGroup-search$_.UserName-groupType Directory }UserName                     SafeName           Permissions---------------------------ACC-G-1_TestSafe_096_YZO-Usr 1_TestSafe_096_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-1_TestSafe_096_YZO-Adm 1_TestSafe_096_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-1_TestSafe_100_YZO-Usr 1_TestSafe_100_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-1_TestSafe_100_YZO-Adm 1_TestSafe_100_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_058_YZO-Usr 3_TestSafe_058_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_058_YZO-Adm 3_TestSafe_058_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_068_YZO-Usr 3_TestSafe_068_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_068_YZO-Adm 3_TestSafe_068_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_069_YZO-Usr 3_TestSafe_069_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_069_YZO-Adm 3_TestSafe_069_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-2_TestSafe_090_YZO-Usr 2_TestSafe_090_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-2_TestSafe_090_YZO-Adm 2_TestSafe_090_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-1_TestSafe_067_YZO-Usr 1_TestSafe_067_YZO@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-1_TestSafe_067_YZO-Adm 1_TestSafe_067_YZO@{useAccounts=True;retrieveAccounts=True; lis...
  • MultiplepsPAS commands can be used together, along with standard PowerShell CmdLets:
#Add all "admin" users in the root location to the PVWAMonitor groupGet-PASUser-UserType EPVUser-Search Admin|Where-Object {$_.location-eq"\" }|Add-PASGroupMember-GroupName PVWAMonitor#Find an account, then find the members of the account's safe.Get-PASAccount-id283_3|Get-PASSafeMemberUserName                     SafeName           Permissions---------------------------SafeAdmin                    3_TestSafe_100_OWZ@{useAccounts=True;retrieveAccounts=True; lis...PSMAppUsers                  3_TestSafe_100_OWZ@{useAccounts=False;retrieveAccounts=False; lis...PasswordManager              3_TestSafe_100_OWZ@{useAccounts=True;retrieveAccounts=True; lis...SafeAdmin3                   3_TestSafe_100_OWZ@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_100_OWZ-Usr 3_TestSafe_100_OWZ@{useAccounts=True;retrieveAccounts=True; lis...ACC-G-3_TestSafe_100_OWZ-Adm 3_TestSafe_100_OWZ@{useAccounts=True;retrieveAccounts=True; lis...Prov_ZZSRV01                 3_TestSafe_100_OWZ@{useAccounts=False;retrieveAccounts=True; lis...psPAS                        3_TestSafe_100_OWZ@{useAccounts=False;retrieveAccounts=True; lis...

Advanced Examples

Logo

Bulk Operations

The standard features of PowerShell which allow creation of and iterations through collections of objects, can be used to perform bulk operations:

Example 1 - On-board Multiple Accounts
$Accounts=Import-Csv-Path C:\Temp\Accounts.csvNew-PASSession-Credential$creds-BaseURI https://your.pvwa.urlforeach($Accountin$Accounts){$Password=ConvertTo-SecureString-String$Account.Password-AsPlainText-ForceAdd-PASAccount-secretType Password`-secret$Password`-platformAccountProperties@{"LOGONDOMAIN"=$Account.LogonDomain}`-SafeName$Account.SafeName`-PlatformID$Account.PlatformID`-Address$Account.Address`-Username$Account.Username}Close-PASSession
Example 2 - Delete Multiple Safes
#Specify Vault Logon Credentials$LogonCredential=Get-Credential#LogonNew-PASSession-Credential$LogonCredential-BaseURI https://your.pvwa.url$Safes=Get-PASSafe-search TestSafe#Delete Safesforeach ($Safein$Safes){Remove-PASSafe-SafeName$Safe.SafeName-WhatIf}#LogoffClose-PASSession
Example 3 - Move a List of Users to a New Location
#Vault Logon Credentials$LogonCredential=Get-Credential#LogonNew-PASSession-Credential$LogonCredential-BaseURI https://your.pvwa.url#get list of users$users=Get-Content .\userlist.txt#move users$users|foreach{Set-PASUser-UserName$_-Location"\New\Location\Path"-WhatIf}#LogoffClose-PASSession

Logo

Safe Permissions

  • Define Safe Roles and assign to safe members:
$Role1= [PSCustomObject]@{UseAccounts=$trueListAccounts=$trueViewAuditLog=$falseViewSafeMembers=$false}$Role2= [PSCustomObject]@{UseAccounts=$falseListAccounts=$trueRetrieveAccounts=$falseAddAccounts=$trueUpdateAccountContent=$trueUpdateAccountProperties=$trueInitiateCPMAccountManagementOperations=$trueSpecifyNextAccountContent=$falseRenameAccounts=$trueDeleteAccounts=$trueUnlockAccounts=$trueManageSafe=$trueManageSafeMembers=$trueBackupSafe=$falseViewAuditLog=$trueViewSafeMembers=$truerequestsAuthorizationLevel1=$falserequestsAuthorizationLevel2=$falseAccessWithoutConfirmation=$trueCreateFolders=$trueDeleteFolders=$trueMoveAccountsAndFolders=$true}$Role1|Add-PASSafeMember-SafeName NewSafe-MemberName a032485-SearchIn VaultUserName SafeName Permissions---------------------------a032485  NewSafe@{useAccounts=True;retrieveAccounts=False;listAccounts=True;...$Role2|Add-PASSafeMember-SafeName NewSafe-MemberName SafeAdmin1-SearchIn VaultUserName   SafeName Permissions---------------------------SafeAdmin1 NewSafe@{useAccounts=False;retrieveAccounts=False;listAccounts=Tr...

Logo

PSM Sessions

Terminate all Active PSM Sessions on a PSM Server
#Find Active Sessions for a PSM Server IP#Terminate the SessionsGet-PASPSMSession|Where-Object{  ($_.RawProperties.ProviderID-eq$(Get-PASComponentDetail-ComponentID SessionManagement|Where-Object{$_.ComponentIP-eq"192.168.60.20"}|    Select-ExpandProperty ComponentUserName))-and ($_.IsLive)-and ($_.CanTerminate)}|Stop-PASPSMSession

Logo

Updating Multiple Properties of an Account

  • Multiple updates can be performed in a single request:
[array]$operations+=@{"op"="remove";"path"="/platformAccountProperties/LogonDomain"}[array]$operations+=@{"op"="replace";"path"="/name";"value"="SomeNewName"}[array]$operations+=@{"op"="replace";"path"="/address";"value"="domain.co.uk"}Set-PASAccount-AccountID286_4-operations$operationsAccountID        :286_4Safe             : 3_TestSafe_028_XYJaddress          : domain.co.ukuserName         : sbwudlovname             : SomeNewNameplatformId       : Z_WINDOMAIN_OFFsecretType       : passwordsecretManagement :@{automaticManagementEnabled=True;lastModifiedTime=1559864222}createdTime      :06/06/201923:37:02

Logo

Using Methods

Methods present on objects returned from psPAS functions can be leveraged to get the data you need with ease.

  • ThepsPAS.CyberArk.Vault.Safe object returned byGet-PASSafe has a ScriptMethod (SafeMembers()), which will run a query for the members of the safe:
#List all safes where AppUser is not a memberGet-PASSafe|Where-Object{ ($_.safemembers()|Select-Object-ExpandProperty UserName)-notcontains"AppUser"}
  • Retrieved credentials can be immediately converted into Secure Strings or into a PsCredential object:
#Returns a Secure String(Get-PASAccount-id330_5|Get-PASAccountPassword).ToSecureString()#Returns a PsCredential Object(Get-PASAccount-id330_5|Get-PASAccountPassword).ToPsCredential()#Returns a PsCredential Object with a custom username (to include a domain for example)(Get-PASAccount-id330_5|Get-PASAccountPassword).ToPsCredential("MyDomain\MyAccount")

Logo

API Sessions

  • If actions are required to be performed under the context of different user accounts, it is possible to work with different authenticated sessions:
#Start first session$VaultAdmin=Get-CredentialPowerShell credential requestEnter your credentials.User: VaultAdminPasswordfor user VaultAdmin:**********New-PASSession-Credential$VaultAdmin-BaseURI https://pvwa.somedomain.comGet-PASLoggedOnUserUserName   Source   UserTypeName AgentUser Expired Disabled Suspended-----------------------------------------------------------VaultAdmin Internal EPVUser      False     False   False    False#Save first session data$FirstSession=Get-PASSession#Start second session$SafeAdmin=Get-CredentialPowerShell credential requestEnter your credentials.User: SafeAdminPasswordfor user SafeAdmin:**********New-PASSession-Credential$SafeAdmin-BaseURI https://pvwa.somedomain.comGet-PASLoggedOnUserUserName  Source   UserTypeName AgentUser Expired Disabled Suspended-----------------------------------------------------------SafeAdmin Internal EPVUser      False     False   False    False#Save second session data$SecondSession=Get-PASSession#Switch back to first sessionUse-PASSession-Session$FirstSessionGet-PASLoggedOnUserUserName   Source   UserTypeName AgentUser Expired Disabled Suspended-----------------------------------------------------------VaultAdmin Internal EPVUser      False     False   False    False#End first sessionClose-PASSession#Switch to second sessionUse-PASSession-Session$SecondSessionGet-PASLoggedOnUserUserName  Source   UserTypeName AgentUser Expired Disabled Suspended-----------------------------------------------------------SafeAdmin Internal EPVUser      False     False   False    False#End second sessionClose-PASSession

Sample Scripts

A selection of psPAS sample scripts can be found in thepsPAS-Examples repository.

Logo

psPAS Functions

This section lists the commands available in psPAS as well as any relevant version requirements.

Depending on your version of CyberArk, different psPAS commands and parameters are available.

The most recent psPAS version should work with your particular CyberArk version and be able to be used with it.

The version requirements for certain parameters are described in greater detail in the command's documentation.

The module will take steps to verify that your version of CyberArk meets any psPAS command's minimum version requirement.

If version requirement criteria are not met, operations may be prevented.

To learn more about the parameters that may be used and the required version, consult the output of the 'Get-Help' command for the 'psPAS' functions.

Click the below dropdown to view the current list of psPAS functions and their minimum version requirements:

List of Functions
Function NameCyberArk VersionDescription
New-PASSession9.0Authenticates a user to CyberArk Vault
Close-PASSession9.0Logoff from CyberArk Vault.
Get-PASSession---GetpsPAS Session Data.
Use-PASSession---SetpsPAS Session Data.
Add-PASPublicSSHKey9.6Adds an authorised public SSH key for a user.
Get-PASPublicSSHKey9.6Retrieves a user's SSH Keys.
Remove-PASPublicSSHKey9.6Deletes a Public SSH Key from a user
Add-PASAccountACL9.0Adds a new privileged command rule to an account.
Get-PASAccountACL9.0Lists privileged commands rule for an account
Remove-PASAccountACL9.0Deletes privileged commands rule from an account
Add-PASAccountGroupMember9.95Adds an account as a member of an account group.
Get-PASAccountGroup9.10Returns account groups in a Safe.
Get-PASAccountGroupMember9.10Returns members of an account group.
New-PASAccountGroup9.95Adds a new account group
Remove-PASAccountGroupMember9.10Deletes a member of an account group
Add-PASAccount9.0Adds a new account.
Add-PASPendingAccount9.7Adds discovered account or SSH key as a pending account.
Get-PASAccount9.3Returns information about accounts.
Get-PASAccountActivity9.7Returns activities for an account.
Get-PASAccountPassword9.7Returns password for an account.
Remove-PASAccount9.3Deletes an account
Set-PASAccount9.5Updates details of an account.
Invoke-PASCPMOperation9.7Invoke CPM verify, change & reconcile tasks.
Unlock-PASAccount9.10Checks in an exclusive-use account.
Add-PASApplication9.1Adds a new application
Add-PASApplicationAuthenticationMethod9.1Add authentication method to an application
Get-PASApplication9.1Returns details of applications
Get-PASApplicationAuthenticationMethod9.1Returns application authentication methods
Remove-PASApplication9.1Deletes an application
Remove-PASApplicationAuthenticationMethod9.1Delete auth method from an application
Import-PASConnectionComponent10.3Imports a Connection Component
New-PASPSMSession9.10Get required parameters to connect through PSM
Get-PASPSMRecording9.10Get details of PSM Recording
Get-PASPSMSession9.10Get details of PSM Sessions
Resume-PASPSMSession10.2Resumes a Suspended PSM Session.
Stop-PASPSMSession10.1Terminates a PSM Session.
Suspend-PASPSMSession10.2Suspends a PSM Session.
Get-PASOnboardingRule9.7Gets automatic on-boarding rules
New-PASOnboardingRule9.7Adds a new on-boarding rule
Remove-PASOnboardingRule9.7Deletes an automatic on-boarding rule
Get-PASPlatform9.10Retrieves details of a specified platform.
Import-PASPlatform10.2Import a new platform
Export-PASPlatform10.4Export a platform
Add-PASPolicyACL9.0Adds a new privileged command rule
Get-PASPolicyACL9.0Lists OPM Rules for a policy
Remove-PASPolicyACL9.0Delete privileged commands from policy
Approve-PASRequest9.10Confirm a single request
Deny-PASRequest9.10Reject a single request
Get-PASRequest9.10List requests
Get-PASRequestDetail9.10Get request details
New-PASRequest9.10Creates an access request for an account
Remove-PASRequest9.10Deletes a request
Add-PASSafeMember9.3Adds a Safe Member to a safe
Get-PASSafeMember9.7Lists the members of a Safe
Remove-PASSafeMember9.3Removes a member from a safe
Set-PASSafeMember9.3Updates a Safe Member's Permissions
Add-PASSafe9.2Adds a new safe
Get-PASSafe9.7Returns safe details
Remove-PASSafe9.3Deletes a safe
Set-PASSafe9.3Updates a safe
Get-PASSafeShareLogo9.7Returns details of SafeShare Logo
Get-PASServer9.7Returns details of the Web Service Server
Get-PASServerWebService9.7Returns details of the Web Service
Get-PASComponentDetail10.1Returns details about component instances.
Get-PASComponentSummary10.1Returns consolidated information about components.
Add-PASGroupMember9.7Adds a user as a group member
Get-PASLoggedOnUser9.7Returns details of the logged on user
Get-PASUserLoginInfo10.4Returns login details of the current user
Get-PASUser9.7Returns details of a user
New-PASUser9.7Creates a new user
Remove-PASUser9.7Deletes a user
Set-PASUser9.7Updates a user
Unblock-PASUser9.7Activates a suspended user
Get-PASDirectory10.4Get configured LDAP directories
Add-PASDirectory10.4Add a new LDAP directory
New-PASDirectoryMapping10.4Create a new LDAP directory mapping
Add-PASPTARule10.4Add a new Risky Commandrule to PTA
Get-PASPTAEvent10.3Get security events from PTA
Set-PASPTAEvent11.3Set PTA security event status
Get-PASPTARemediation10.4Get automatic response config from PTA
Get-PASPTARule10.4List Risky Command rules from PTA
Set-PASPTARemediation10.4Update automaticresponse config in PTA
Set-PASPTARule10.4Update a Risky Commandrule in PTA
Get-PASAccountDetail10.4Returns information about accounts.
Get-PASGroup10.5Return group information
Remove-PASGroupMember10.5Remove group members
Set-PASOnboardingRule10.5Update Onboarding Rules
Add-PASDiscoveredAccount10.5Add discovered accounts to the Accounts Feed
Connect-PASPSMSession10.5Get required parameters to connect to a PSM Session
Get-PASPSMSessionActivity10.6Get activity details from an active PSM Session.
Get-PASPSMSessionProperty10.6Get property details from an active PSM Session.
Get-PASPSMRecordingActivity10.6Get activity details from a PSM Recording.
Get-PASPSMRecordingProperty10.6Get property details from a PSM Recording.
Export-PASPSMRecording10.6Save PSM Session Recording to a file.
Request-PASJustInTimeAccess10.6Request temporary access to a server.
Revoke-PASJustInTimeAccess12.0Revoke temporary server access.
Get-PASDirectoryMapping10.7Get details of configured directory mappings.
Set-PASDirectoryMapping10.7Update a configured directory mapping.
Remove-PASDirectory10.7Delete a directory configuration.
Find-PASSafe10.1 -11.7List or Search Safes by name.
Set-PASDirectoryMappingOrder10.10Reorder Directory Mappings
Set-PASUserPassword10.10Reset a User's Password
New-PASGroup11.1Create a new CyberArk group
Get-PASPlatformSafe11.1List details for all platforms
Remove-PASDirectoryMapping11.1Deletes a Directory Mapping
Enable-PASCPMAutoManagement10.4Enables Automatic CPM Management for an account
Disable-PASCPMAutoManagement10.4Disables Automatic CPM Management for an account
Test-PASPSMRecording11.2Determine validity of PSM Session Recording
Copy-PASPlatform11.4Duplicate a platform
Enable-PASPlatform11.4Enable a platform
Disable-PASPlatform11.4Disable a platform
Remove-PASPlatform11.4Delete a platform
Remove-PASGroup11.5Delete a user group
Get-PASAllowedReferrer11.5List PVWA Allowed Referrer
Add-PASAllowedReferrer11.5Add PVWA Allowed Referrer
Get-PASAccountSSHKey11.5Get Private SSH Key value of Account
Get-PASAuthenticationMethod11.5List authentication methods
Add-PASAuthenticationMethod11.5Add authentication method
Set-PASAuthenticationMethod11.5Update authentication method
Get-PASConnectionComponent11.5List configured connection components
Get-PASPSMServer11.5List configured PSM Servers
Get-PASPlatformPSMConfig11.5List Platform PSM configuration
Set-PASPlatformPSMConfig11.5Update Platform PSM configuration
Start-PASAccountImportJob11.6Add multiple accounts to existing Safes.
Get-PASAccountImportJob11.6Get status of account import
New-PASAccountObject---Format an object to include in an import list
Get-PASDiscoveredAccount11.6List discovered accounts
Add-PASOpenIDConnectProvider11.7Adds an OIDC Authentication Provider
Get-PASOpenIDConnectProvider11.7Gets details of configured OIDC Authentication Providers
Remove-PASOpenIDConnectProvider11.7Deletes an OIDC Authentication Provider
Set-PASOpenIDConnectProvider11.7Updates an OIDC Authentication Provider
Remove-PASAuthenticationMethod11.7Delete an authentication method
Clear-PASDiscoveredAccountList12.1Clear all discovered accounts from the pending account list
Get-PASAccountPasswordVersion12.1Get details of previous password versions
New-PASAccountPassword12.0Generate new password values based on platform policy
Set-PASLinkedAccount12.1Associate logon and reconcile accounts
Clear-PASLinkedAccount12.2Clear associated linked accounts
Clear-PASPrivateSSHKey12.1Remove all MFA caching SSH Keys
New-PASPrivateSSHKey12.1Generate MFA caching SSH Keys
Remove-PASPrivateSSHKey12.1Delete MFA caching SSH Keys
Set-PASGroup12.0Update CyberArk groups
Get-PASPlatformSummary12.2Get information on platform system types
Enable-PASUser12.6Enable CyberArk Users
Disable-PASUser12.6Disable CyberArk Users
Publish-PASDiscoveredAccount12.6Onboard Discovered Accounts
Get-PASLinkedAccount12.2Get details of linked accounts
Get-PASLinkedGroup12.2Get details of linked groups
Add-PASPersonalAdminAccount12.6Add Personal Admin Account (Privilege Cloud Only).
Get-PASPTAGlobalCatalog13.0Get Global Catalog connectivity details for PTA.
Add-PASPTAGlobalCatalog13.0Add Global Catalog connectivity details to PTA.
Get-PASUserTypeInfo13.2Get User Type Info
Get-PASPTARiskEvent13.2Get PTA Risk Events
Set-PASPTARiskEvent13.2Update PTA Risk Events
Get-PASPTARiskSummary13.2Get PTA Risk Summary
New-PASRequestObject---Format an object to include in an request list
Add-PASPTAIncludedTarget14.0Includes a PTA Monitored Target
Add-PASPTAExcludedTarget14.0Excludes a PTA Monitored Target
Add-PASPTAPrivilegedGroup14.0Configures a PTA Privileged Group
Add-PASPTAPrivilegedUser14.0Configures a PTA Privileged User
Get-PASPTAExcludedTarget14.0Get PTA Excluded Target
Get-PASPTAIncludedTarget14.0Get PTA Included target
Get-PASPTAPrivilegedGroup14.0Get PTA Privileged Group
Get-PASPTAPrivilegedUser14.0Get PTA Privileged User
Remove-PASPTAExcludedTarget14.0Remove PTA Excluded Target
Remove-PASPTAIncludedTarget14.0Remove PTA Included Target
Remove-PASPTAPrivilegedGroup14.0Remove PTA Privileged Group
Remove-PASPTAPrivilegedUser14.0Remove PTA Privileged User
Set-PASIPAllowListP Cloud OnlySet P Cloud IP Allow List
Get-PASIPAllowListP Cloud OnlyGet P Cloud IP Allow List
Get-PASBYOKConfigP Cloud OnlyGet P Cloud BYOK Config
Publish-PASDiscoveredLocalAccountP Cloud OnlyPublish P Cloud Discovered Local Account
Remove-PASDiscoveredLocalAccountP Cloud OnlyDelete P Cloud Discovered Local Account
Get-PASDiscoveredLocalAccountActivityP Cloud OnlyGet P Cloud Discovered Local Account Activity
Get-PASDiscoveredLocalAccountP Cloud OnlyGet P Cloud Discovered Local Account
Clear-PASDiscoveredLocalAccountP Cloud OnlyClear all P Cloud Discovered Local Accounts
Add-PASDiscoveredLocalAccountP Cloud OnlyAdd P Cloud Discovered Local Account

Installation

Logo

Prerequisites

  • 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.

Install Options

Users can download psPAS from GitHub or the PowerShell Gallery.

Choose any of the following ways to download the module and install it:

Option 1: Install from PowerShell Gallery

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

PowerShell 5.0 or above must be used to download the module from thePowerShell Gallery.

  1. Open a PowerShell prompt

  2. Execute the following command:

Install-Module-Name psPAS-Scope CurrentUser

Option 2: Manual Install

The 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:

$env:PSModulePath.split(';')

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

More:about_PSModulePath

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

PowerShell Gallery
  • Download from the module from thePowerShell Gallery:
    • Run the PowerShell commandSave-Module -Name psPAS -Path C:\temp
    • Copy theC:\temp\psPAS folder to your "Powershell Modules" directory of choice.
psPAS Release
  • Download the latest GitHub release
    • Unblock & Extract the archive
    • Rename the extractedpsPAS-v#.#.# folder topsPAS
    • Copy thepsPAS folder to your "Powershell Modules" directory of choice.
psPAS Branch
  • DownloadGitHub Branch
    • Unblock & Extract the archive
    • Copy thepsPAS (\<Archive Root>\psPAS-master\psPAS) folder to your "Powershell Modules" directory of choice.

Verification

Validate Install:

Get-Module-ListAvailable psPAS

Import the module:

Import-Module psPAS

List Module Commands:

Get-Command-Module psPAS

Get detailed information on specific commands:

Get-HelpNew-PASUser-Full

Logo

Sponsorship

Please support continued psPAS development; consider sponsoring @pspete on GitHub Sponsors

Changelog

All notable changes to this project will be documented in theChangelog

Author

License

This project islicensed under the MIT License.

Contributing

Any and all contributions to this project are appreciated.

See theCONTRIBUTING.md for a few more details.

Support

psPAS is neither developed nor supported by CyberArk; any official support channels offered by the vendor are not appropriate for seeking help with the psPAS module.

Help and support should be sought byopening an issue, or emailingpspas@pspete.dev.

Priority support could be considered forsponsors of @pspete,contact us to discuss options.

Acknowledgements

Hat Tips:

Joe Garcia (infamousjoeg)for the unofficial API documentation, general API wizardry & knowledge sharing.

Jesse McWilliams(JesseMcWilliamss)For the information needed to add PKIPN authentication intoNew-PASSession

Wojciech Ossowski(Qrelis)For sharing the details of the account unlock API.

Allyn Lindsay(allynl93)forPS-SAML-Interactive

Assaf Miron(AssafMiron)For the JSON formatting assistance.

Warren Frame(RamblingCookieMonster) forAdd-ObjectDetail.ps1.

Chapeau!

Logo


[8]ページ先頭

©2009-2025 Movatter.jp