Skip to main content

Add-Credential

Command Description

Add a credential. You can view the added credential in the Windows credential manager

Command Prototype

bRet = Credential.Add(cName,userName,password,cType,sType)

Parameter Description

ParameterRequiredTypeDefaultDescription
cNameTruestring""Credential name used to differentiate each credential
userNameTruestring""Set the username of the credential
passwordTruestring""Set the access password for the credentials
cTypeTrueenum"normal"Credential type
sTypeTrueenum"enterprise"The type of credentials saved

return

bRet,The variable used to save the output of the command.

Demo

TracePrint("--------------------------Add Credentials------------------- --------") 
//-------------------------------------------------------------------------------
//[Remarks] Add a credential, which can be viewed in the Credential Manager of the Windows system.
//Input parameter 1:
// cName--credential name. NOTE: The name of the credential, used to distinguish each credential
// userName--username. Note: Set the username for the credentials
// password--password. Note: Set the access password for credentials
// cType--credential type. Note: the type of credential
// sType--save type. Note: The type of credential saved
//out parameters:
// bRet--The variable to which the output of the function call is saved.
//Command Prototype:bRet = Credential.Add(cName,userName,password,cType,sType)
bRet = Credential.Add("Command Library 6.0","laiye","test","normal","enterprise")