Uses Windows Scheduled Tasks, AAM Credential Provider/Central Credential Provider, and Export-Clixml to schedule password changes for CyberArk-managed accounts.
On the machine you are creating the Scheduled Task on:
- psPAS
- CredentialRetriever
- Administrator rights on the machine you are creataing the Scheduled Task on.
- Clone the repository to the machine you want the Scheduled Task to run on.
- Open an elevated PowerShell prompt and run
Import-Module New-ScheduledPASAccountPasswordChange
. - Run
New-ScheduledPASAccountPasswordChange
$arguments = @{
AccountId = '12_7'
AppId = 'scheduledPasswordChangeScript'
ChangeTime = ((Get-Date).AddSeconds(5))
PvwaAddress = 'https://comp01'
Password = ("VeryComplex!23" | ConvertTo-SecureString -AsPlainText -Force)
Safe = 'CyberArk'
UserName = 'serviceAccount01'
Address = '192.168.0.50'
CentralCredentialProviderURL = 'https://comp01'
}
New-ScheduledPASAccountPasswordChange @arguments
Double check in Task Scheduler that your new Task has been created.