PowerShell script reference for Adaptable Credential
This section documents all available PowerShell functions for use with the Adaptable Credential driver. You'll find a sample Adaptable Credential script, Template.ps1, in drive:\Program Files\Venafi\Scripts\AdaptableCredential\Samples. However, for PowerShell scripts to function, they must be moved into their respective folders: drive:\Program Files\Venafi\Scripts\[AdaptableDriver].
TIP For more information about reference sample scripts, such as the HashiCorp Vault reference sample, visit the
NOTE To work effectively with any Venafi adaptable solution, you must have some working knowledge of PowerShell scripting, or you must have equivalent experience with a scripting language similar to PowerShell.
The input parameters and response format for each function is predefined. All functions receive a set of general parameters, whereas those parameters that are specific to the function are only passed to it.
DID YOU KNOW? To prevent vulnerabilities, the PowerShell scripts are stored on the Trust Protection Platform server. While it might have been more convenient to allow downloading the script, storing the scripts on the Trust Protection Platform server prevents potentially harmful scripts from affecting the server. Only privileged users on your Trust Protection Platform server can access the script.
If you have multiple Venafi Trust Protection Platform servers, you need to ensure your Adaptable Credential scripts are on all servers in the cluster. For this reason, it is wise to include a script version number in the file name, so you can easily check to see that the same version of the script is installed on all servers in the cluster.
Data is passed to the functions using hash tables (key-value pairs). Using hash tables enables the addition of new functions in future releases. For more information, see About hash tables for Adaptable Credentials.
BEST PRACTICE When customizing (or creating a new) PowerShell script, keep the following security best practices in mind:
- Avoid hard-coding credentials into your PowerShell scripts.
- Only include code in functions that relate to the task they are designated to perform.
- Scripts should not do anything that could alter the integrity or availability of the local Windows system (the system hosting Trust Protection Platform).
When you've created your script, learn how to create Adaptable Credentials and put your script to work.
To continue with developing your Adaptable Credential PowerShell script, refer to the following topics:
About hash tables for Adaptable Credentials