The first command assigns a user name to the $User variable.
The second command converts a plain text password into a secure string by using the ConvertTo-SecureString cmdlet.
The command stores that object in the $Password variable.
The third command creates a credential based on $User and $Password, and then stores it in the $Credential variable.
The final command creates an Automation credential named ContosoCredential that uses $Credential.
Parameters
-AutomationAccountName
Specifies the name of the Automation account in which this cmdlet stores the credential.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.