PowerShell Cmdlets for Credentials Management
- Print
- DarkLight
- PDF
PowerShell Cmdlets for Credentials Management
- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
You can use the following PowerShell cmdlets to manage ControlUp user credentials:
Add-CUCredentials
Syntax
PowerShell
PowerShell
Add-CUCredentials
-User or ClientId (string)
-Password or SecretKey (SecureString)
-Domain (string)
-SiteName (string)
-FriendlyName (string)
-IsCloud or -ShareWithUser (string)
Description
Creates new ControlUp user credentials using input parameters as either shared credentials or monitor credentials. Note that this cmdlet doesn't validate or test credentials before creating them.
Parameters
Parameter | Description | Required |
---|---|---|
-User | Creates user name | Yes, if creating shared credentials |
-Password | Switch parameter for -SecretKey, password to create shared credentials. | Yes, if creating shared credentials |
-Domain | Domain name | Yes, if creating shared credentials |
-SiteName | Name of the specific site to which the credentials will be associated. If not provided, all sites in your organization will be used by default. | No |
-FriendlyName | Unique name of the credentials used to more easily identify them. Generated by default in format “Domain\UserName“. Add-CUCredentials checks if this parameter already exists among the credentials, if yes, the exception will be thrown. | No |
-ClientId | User’s unique ID. | Yes, if creating monitor credentials |
-SecretKey | Switch parameter for -Password, secret key to create monitor credentials. | Yes, if creating monitor credentials |
-IsCloud | Switch parameter for -ShareWithUser, creates monitor credentials. | Yes, if creating monitor credentials |
-ShareWithUser | Switch parameter for -IsCloud, creates shared credentials. | Yes, if creating shared credentials |
Examples
To create shared credentials:
PowerShell
PowerShell
Add-CUCredentials
-User UserName.Test -Password $PasswordSecureString -Domain cucorp.controlup.com -SiteName Default -FriendlyName MyNewCredentials -ShareWithUser
To create monitor credentials:
PowerShell
PowerShell
Add-CUCredentials
-Add-CUCredentials -ClientId TestClientId -SecretKey $SecretKeySecureString -FriendlyName MyNewCloudCredentials -IsCloud
Remove-CUCredentials
Syntax
PowerShell
PowerShell
Remove-CUCredentials
-Key (string)
Description
Removes existing shared credentials or monitor credentials by key.
Parameters
Parameter | Description | Required |
---|---|---|
-Key | Unique ID of the credentials. To receive the key, use the Get-CUSystemCredentials cmdlet. | Yes |
Example
PowerShell
PowerShell
Remove-CUCredentials
-Key 4dd703af-c57d-472e-9edd-86d018d19bb3
Set-CUCredentialsPassword
Syntax
PowerShell
PowerShell
Set-CUCredentialsPassword
-Key (string)
-NewPassword (SecureString)
Description
Updates the password for existing shared credentials or monitor credentials by key. Note that this cmdlet doesn't validate credentials before saving them with the new password.
Parameters
Parameter | Description | Required |
---|---|---|
-Key | Unique ID of the credentials. To receive the key, use the Get-CUSystemCredentials cmdlet. | Yes |
-NewPassword | New password to update the credentials. | Yes |
Example
PowerShell
PowerShell
Set-CUCredentialsPassword
-Key 43c0a89c-be4d-4684-8a72-16aca73875d2
-NewPassword $NewPasswordSecureString
Was this article helpful?