Name
Set-JS7Credentials
SYNOPSIS
Sets credentials that are used to authenticate with requests to the JS7 Web Services.
SYNTAX
Set-JS7Credentials [-UseDefaultCredentials] [-AskForCredentials] [[-Credentials] <PSCredential>] [-ProxyUseDefaultCredentials] [-ProxyAskForCredentials] [[-ProxyCredentials] <PSCredential>] [<CommonParameters>]
DESCRIPTION
Credentials are required to authenticate with the JS7 Web Service.
Such credentials can be specified on-the-fly with the Connect-JS7 cmdlet or
they can be specified with this cmdlet.
PARAMETERS
UseDefaultCredentials
-UseDefaultCredentials <SwitchParameter>
Specifies that the implicit Windows credentials of the current user are applied for authentication challenges.
Either the parameter -UseDefaultCredentials or -Credentials can be used.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
AskForCredentials
-AskForCredentials <SwitchParameter>
Specifies that the user is prompted for the account and password that are used for authentication with JS7.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Credentials
-Credentials <PSCredential>
Specifies a credentials object that is used for authentication with JS7.
A credentials object can be created e.g. with:
$account = 'John'
$password = ( 'Doe' | ConvertTo-SecureString -AsPlainText -Force)
$credentials = New-Object -typename System.Management.Automation.PSCredential -Argumentlist $account, $password
An existing credentials object can be retrieved from the Windows Credential Manager e.g. with:
$systemCredentials = Get-JS7SystemCredentials -TargetName 'localhost'
$credentials = ( New-Object -typename System.Management.Automation.PSCredential -Argumentlist $systemCredentials.UserName, $systemCredentials.Password )
Either the parameter -UseDefaultCredentials or -Credentials can be used.
Required? | false |
Position? | 1 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
ProxyUseDefaultCredentials
-ProxyUseDefaultCredentials <SwitchParameter>
Specifies that the implicit Windows credentials of the current user are applied for proxy authentication.
Either the parameter -ProxyUseDefaultCredentials or -ProxyCredentials can be used.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
ProxyAskForCredentials
-ProxyAskForCredentials <SwitchParameter>
Specifies that the user is prompted for the account and password that are used for authentication with a proxy.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
ProxyCredentials
-ProxyCredentials <PSCredential>
Specifies a credentials object that is used for authentication with a proxy. See parameter -Credentials how to create a credentials object.
Either the parameter -ProxyUseDefaultCredentials or -ProxyCredentials can be used.
Required? | false |
Position? | 2 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
RELATED LINKS
EXAMPLES
-------------------------- EXAMPLE 1 --------------------------
PS > Set-JobSchedulerCredentials -UseDefaultCredentials
The implicit Windows credentials are used for authentication. No password is used or stored in memory.
-------------------------- EXAMPLE 2 --------------------------
PS > Set-JobSchedulerCredentials -AskForCredentials
Specifies that the user is prompted for account and password. The password is converted to a secure string and a credentials object is created for authentication.
-------------------------- EXAMPLE 3 --------------------------
PS > $account = 'John'
$password = ('Doe' | ConvertTo-SecureString -AsPlainText -Force)
$credentials = New-Object -typename System.Management.Automation.PSCredential -ArgumentList $account, $password
Set-JS7Credentials -Credentials $credentials
An individual credentials object is created that is assigned the -Credentials parameter.
-------------------------- EXAMPLE 4 --------------------------
PS > $account = 'John'
$password = Read-Host 'Enter password for John: ' -AsSecureString
$credentials = New-Object -typename System.Management.Automation.PSCredential -ArgumentList $account, $password
Set-JS7Credentials -Credentials $credentials
An individual credentials object is created that is assigned the -Credentials parameter.