PowerShell Cmdlets for Credentials Management
    • Dark
      Light
    • PDF

    PowerShell Cmdlets for Credentials Management

    • Dark
      Light
    • PDF

    Article Summary

    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

    ParameterDescriptionRequired
    -UserCreates user nameYes, if creating shared credentials
    -PasswordSwitch parameter for -SecretKey, password to create shared credentials.Yes, if creating shared credentials
    -DomainDomain nameYes, if creating shared credentials
    -SiteNameName 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
    -FriendlyNameUnique 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
    -ClientIdUser’s unique ID.Yes, if creating monitor credentials
    -SecretKeySwitch parameter for -Password, secret key to create monitor credentials.Yes, if creating monitor credentials
    -IsCloudSwitch parameter for -ShareWithUser, creates monitor credentials.Yes, if creating monitor credentials
    -ShareWithUserSwitch 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

    ParameterDescriptionRequired
    -KeyUnique 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

    ParameterDescriptionRequired
    -KeyUnique ID of the credentials. To receive the key, use the Get-CUSystemCredentials cmdlet.Yes
    -NewPasswordNew password to update the credentials.Yes

    Example

    PowerShell
    PowerShell
    Set-CUCredentialsPassword 
        -Key 43c0a89c-be4d-4684-8a72-16aca73875d2
        -NewPassword $NewPasswordSecureString

    Was this article helpful?