Granting permanent elevated privileges to your admins represents an open security vulnerability. You can avoid this by using vaulted admin credentials in EmpowerID so that usernames and passwords are stored in a secure, encrypted password vault. When your system admins require elevated privileges for use in a PowerShell script, the EmpowerID system retrieves the credentials and generates a PSCredential object for them to use.
This topic shows how non-admins can retrieve shared admin credentials from EmpowerID for use in your PowerShell scripts.
Create a shared credential in EmpowerID. For more information, see Vaulting Non-Computer Credentials. |
In the OAuth Provider Application Details page that appears, enter information in the fields about the application for which you want to share credentials to use in your PowerShell script.
For more information on OAuth applications, see Creating an OAuth Application for Andy's Beans. |
In Windows PowerShell ISE (or any text editor), paste the following script:
Replace the following values in the script:
$ClientID – replace the xxx with the GUID value from the Client ID (Key) of your OAuth application
$ClientSecret – replace the xxx with the GUID value from the Client Secret of your OAuth application
$APIKey – replace the xxx with the GUID value from the API Key of your OAuth application
Paste this value at the PowerShell prompt and press Enter. PowerShell proceeds to check out the credentials.
If your PowerShell instance disappears instead of checking out the credentials, your server may not be set to allow you to execute scripts. See About Execution Policies in the Microsoft PowerShell documentation to learn how to change your execution policy. |
|
|