Get-Credentials
Command Description
Returns credentials, formatted as {"username": "username ", "password ": "password "}. Normal credentials will be returned with their passwords encrypted. Password of Windows credentials cannot be obtained
Command Prototype
objCredential = Credential.Get(cName,cType)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
cName | True | string | "" | Name of the credential to get |
cType | True | enum | "normal" | Credential type |
return
objCredential,The variable used to save the output of the command.
Demo
TracePrint("--------------------------Get Credentials------------------- --------")
//-------------------------------------------------------------------------------
//[Remarks] To obtain credentials, the content is returned in the format of {"username":"username","password":"password"}. The obtained ordinary credentials passwords will be encrypted and protected; Windows credentials cannot obtain passwords.
//Input parameter 1:
// cName--credential name. NOTE: The name of the credential, used to distinguish each credential
// cType--credential type. Note: the type of credential
//out parameters:
// objCredential--The variable to which the output of the function call is saved.
//Command prototype: objCredential = Credential.Get(cName,cType)
objCredential = Credential.Get("Command Library 6.0","normal")
TracePrint(objCredential)