Overview
Cayosoft Administrator requires Active Directory and Azure AD credentials to connect to managed domains, forests, tenants, and other managed systems. These credentials typically have high-privileged access to the Active Directory, Azure AD, and other environments. As such, these credentials must be protected.
Some companies may decide to rotate passwords for these credentials periodically. As part of that rotation process, passwords must be updated in Cayosoft Administrator.
This article describes how to update connection accounts passwords programmatically or from a command line.
How to update Active Directory connection passwords programmatically
On the machine running the Cayosoft Administration Service:
- Download the CayoAdmin_UpdateConnectionPasswords.ps1 script attached to this article, rename it to *.ps1, and place it on the machine running the Cayosoft Administration Service.
- Start a PowerShell.exe, Windows PowerShell ISE, or a similar application.
- Run the following command:
- C:\Temp\CayoAdmin_UpdateConnectionPasswords.ps1 -pwdToPasswords @{"DOMAIN\Administrator"="password123_";"test@domain.com"="Password2";};
- Where:
- "C:\Temp\" is the folder where you place the PS1 file.
- "DOMAIN\Administrator" and "password123_" is the AD connection account and it's a new password.
- "test@domain.com" and "Password2" is the Azure AD connection account, and it's a new password.
From a remote machine:
- Ensure PS Remoting is configured on the machine running Cayosoft Administration Server: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-7.2
- Start a PowerShell.exe, Windows PowerShell ISE, or a similar application on a remote machine.
- Run the following script:
$User = "Domain\User1"
$PWord = ConvertTo-SecureString -String "User1Password" -AsPlainText -Force
$creds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord
$newPasswords =@{"DOMAIN\Administrator"="password123_";"test@domain.com"="Password2"}
Invoke-Command -ComputerName cayoadminsrv.domain.local -Credential $creds -FilePath "C:\Temp\CayoAdmin_UpdateConnectionPasswords.ps1" -ArgumentList $newPasswords - In this script:
- "Domain\User1" is an account to connect to a server running Cayosoft Administration Service. This account should be a local administrator on that server.
- "User1Password" is a password for "Domain\User1".
- "cayoadminsrv.domain.local" is the DNS name of the server running Cayosoft Administration Service.
- Other parameters are the same as described in the previous section.
Comments
0 comments
Please sign in to leave a comment.