提示凭据
要提示输入凭据,你几乎应该始终使用 Get-Credential
cmdlet:
$credential = Get-Credential
预填充的用户名:
$credential = Get-Credential -UserName 'myUser'
添加自定义提示消息:
$credential = Get-Credential -Message 'Please enter your company email address and password.'
要提示输入凭据,你几乎应该始终使用 Get-Credential
cmdlet:
$credential = Get-Credential
预填充的用户名:
$credential = Get-Credential -UserName 'myUser'
添加自定义提示消息:
$credential = Get-Credential -Message 'Please enter your company email address and password.'