...
-------------------------- EXAMPLE 3 --------------------------
C:\PS>$account = 'John'
$password = ('Doe' | ConvertTo-SecureString -AsPlainText -Force)
$credentials = New-Object -typename System.Management.Automation.PSCredential -ArgumentList $account, $password
Set-JobSchedulerCredentials -Credentials $credentials
An individual credentials object is created that is assigned the -Credentials parameter.
-------------------------- EXAMPLE 4 --------------------------
C:\PS>$account = 'Johnjohn'
$password = Read-Host 'Enter password for John: ' -AsSecureString
$credentials = New-Object -typename System.Management.Automation.PSCredential -argumentlist ArgumentList $account, $password
Set-JobSchedulerCredentials -Credentials $credentials
...