psPAS.Types.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Types>
    <Type>
        <Name>psPAS.CyberArk.Vault.SafeMember</Name>
        <Members>
            <ScriptMethod>
                <Name>UserSource</Name>
                <Script>
                    $this | Get-PASUser | Select-Object -ExpandProperty Source
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>UserType</Name>
                <Script>
                    $this | Get-PASUser | Select-Object -ExpandProperty UserTypeName
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>IsAgentUser</Name>
                <Script>
                    $this | Get-PASUser | Select-Object -ExpandProperty AgentUser
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>IsExpired</Name>
                <Script>
                    $this | Get-PASUser | Select-Object -ExpandProperty Expired
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>IsDisabled</Name>
                <Script>
                    $this | Get-PASUser | Select-Object -ExpandProperty Disabled
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>IsSuspended</Name>
                <Script>
                    $this | Get-PASUser | Select-Object -ExpandProperty Suspended
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>Remove</Name>
                <Script>
                    Param([bool]$force)

                    if ($force) {

                    $this | Remove-PASSafeMember -Confirm:$false

                    }

                    else{

                    $this | Remove-PASSafeMember -Confirm

                    }
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
    <Type>
        <Name>psPAS.CyberArk.Vault.User</Name>
        <Members>
            <ScriptMethod>
                <Name>Activate</Name>
                <Script>
                    $this | Unblock-PASUser -Suspended $false
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>Disable</Name>
                <Script>
                    $this | Set-PASUser -Disabled $true
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>Enable</Name>
                <Script>
                    $this | Set-PASUser -Disabled $false
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>Remove</Name>
                <Script>
                    Param([bool]$force)

                    if ($force) {

                    $this | Remove-PASUser -Confirm:$false

                    }

                    else{

                    $this | Remove-PASUser -Confirm

                    }
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
    <Type>
        <Name>psPAS.CyberArk.Vault.Safe</Name>
        <Members>
            <ScriptMethod>
                <Name>SafeMembers</Name>
                <Script>
                    $this | Get-PASSafeMember
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>Remove</Name>
                <Script>
                    Param([bool]$force)

                    if ($force) {

                    $this | Remove-PASSafe -Confirm:$false

                    }

                    else{

                    $this | Remove-PASSafe -Confirm

                    }
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
    <Type>
        <Name>psPAS.CyberArk.Vault.Account</Name>
        <Members>
            <ScriptMethod>
                <Name>GetActivity</Name>
                <Script>
                    $this | Get-PASAccountActivity
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>GetPassword</Name>
                <Script>
                    $this | Get-PASAccountPassword
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>VerifyPassword</Name>
                <Script>
                    $this | Start-PASCredVerify
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>ChangePassword</Name>
                <Script>
                    $this | Start-PASCredChange -ImmediateChangeByCPM Yes
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>Remove</Name>
                <Script>
                    Param([bool]$force)

                    if ($force) {

                    $this | Remove-PASAccount -Confirm:$false

                    }

                    else{

                    $this | Remove-PASAccount -Confirm

                    }
                </Script>
            </ScriptMethod>
            <ScriptMethod>
                <Name>CopyToSafe</Name>
                <Script>
                    Param([string]$safe=$(throw "Destination Safe Must Be Specified."))

                    $this | Add-PASAccount -Safe $safe -password $($this.GetPassword()).ToSecureString()

                    $that = $this | Get-PASAccount -Keywords $this.UserName -Safe $safe

                    $this | Set-PASAccount -AccountID $that.AccountID
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
    <Type>
        <Name>psPAS.CyberArk.Vault.ACL.Policy</Name>
        <Members>
            <ScriptMethod>
                <Name>Remove</Name>
                <Script>
                    Param([bool]$force)

                    if ($force) {

                    $this | Remove-PASPolicyACL -Confirm:$false

                    }

                    else{

                    $this | Remove-PASPolicyACL -Confirm

                    }
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
    <Type>
        <Name>psPAS.CyberArk.Vault.ACL.Account</Name>
        <Members>
            <ScriptMethod>
                <Name>Remove</Name>
                <Script>
                    Param([bool]$force)

                    if ($force) {

                    $this | Remove-PASAccountACL -Confirm:$false

                    }

                    else{

                    $this | Remove-PASAccountACL -Confirm

                    }
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
    <Type>
        <Name>psPAS.CyberArk.Vault.Credential</Name>
        <Members>
            <ScriptMethod>
                <Name>ToSecureString</Name>
                <Script>
                    $this | Select-Object -ExpandProperty Password | ConvertTo-SecureString -AsPlainText -Force
                </Script>
            </ScriptMethod>
        </Members>
    </Type>
</Types>