访问控制器时,需要使用凭据。系统根据需要使用相应的开关。例如,如果尝试连接到控制器时不需要续订密码,将忽略相应的开关 -renewalpassword。
可用的开关:
-username:请求访问的用户的名称
-password:请求访问的用户的密码
-renewalpassword:请求新密码(首次连接或在控制器上的设备用户权限复位后)时使用的密码
开关的使用取决于 EcoStruxure Machine Expert 的版本。
EcoStruxure Machine Expert < 2.0
首次连接到控制器时,以及在复位了控制器上的设备用户权限后,需要使用以下设置:
-username: Administrator
-password: Administrator
-renewalpassword:MyNewPassword(MyNewPassword 对应于要使用的新密码)
示例:首次访问 EcoStruxure Machine Expert < 2.0
-username Administrator -password Administrator -renewalpassword MyNewPassword -getcontrollerinfo etcp4://10.128.154.217 C:\Temp\Logfile.log
示例:后续访问 EcoStruxure Machine Expert < 2.0
对于后续访问, -username 仍为“Administrator”,而 -password 为新密码。
-username Administrator -password MyNewPassword -renewalpassword MyNewPassword -getcontrollerinfo etcp4://10.128.154.217 C:\Temp\Logfile.log
EcoStruxure Machine Expert 2.0 及更高版本
首次连接到控制器时,以及在复位了控制器上的设备用户权限后,需要使用以下设置:
-username: MyNewUserName (is the new user name you want to use)
-password: MyNewPassword (is the new password to use)
-renewalpassword:MyNewPassword(要使用的新密码)
示例:后续访问 EcoStruxure Machine Expert 2.0 及更高版本
-username MyNewUserName -password MyNewPassword -renewalpassword MyNewPassword -getcontrollerinfo etcp4://10.128.154.217 C:\Temp\Logfile.log
如果建立了到控制器的连接,但尚无控制器证书可用,此可选调用参数开关将允许您决定如何执行后续操作:
promptuser(缺省设置):显示一条用户提示,让您能够决定如何使用检测到的证书执行后续操作。
donottrust:将证书声明为不可信,如果请求连接,则连接失败。
trustonce:将证书声明为对于此通讯尝试是可信的,但不将证书保存在此 PC 的 Windows User certificates 的 Controllers 文件夹中。
trustalways:将证书声明为可信并保存在此 PC 的 Windows User certificates 的 Controllers 文件夹中。
用法:
[-untrustedServerCertificateValidationMode <promptuser|donottrust|trustonce|trustalways>]
示例:
ControllerAssistant -encryptedcommunication auto -untrustedServerCertificateValidationMode trustonce -username MyUser -password MyPassword -imagedirectory c:\Temp\MyImage -loadcontrol ip etcp4://190.201.100.100 C:\Temp\Logfile.log
此外,可以接受或拒绝过期的服务器证书:
promptuser (缺省设置):显示用户提示,让您决定如何处理过期的服务器证书。
false:已过期的服务器证书声明为不可信,如果请求连接,则连接失败。
true:已过期的服务器证书被声明为可信。
用法:
[-AcceptExpiredServerCertificates <promptuser|false|true>]
示例:
ControllerAssistant.exe -username MyUserName -password MyUserNamePassword -renewalpassword MyFirstUserPassword -untrustedservercertificatevalidationmode trustonce -AcceptExpiredServerCertificates true –getcontrollerinfo etcp4://192.168.2.50:11740 C:\Temp\Logfile.log
此可选调用参数开关可用于在连接到控制器时设置加密模式:
no:不使用加密。
tls:使用 TLS 加密。
auto(缺省设置):使用控制器支持的最安全的模式。
用法:
[-encryptedcommunication <no|tls|auto>]
示例:
ControllerAssistant -encryptedcommunication auto -untrustedServerCertificateValidationMode trustonce -username MyUser -password MyPassword -imagedirectory c:\Temp\MyImage -loadcontrol ip etcp4://190.201.100.100 C:\Temp\Logfile.log