@
lifansama 不好意思,我试了一下不知道哪个位置有错误,不太懂这个语法,可否请大佬帮忙看看,感激不尽
```
PS C:\Users\endif> $userName = 'abc'
PS C:\Users\endif> $userPassword = '123'
PS C:\Users\endif> $secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force
PS C:\Users\endif> $cred =New-Object System.Management.Automation.PSCredential ($userName, $secStringPassword) start-process -filepath 'C:\Program Files\WindowsApps\TencentWeChatLimited.forWindows10...(略)\WeChatStore\WeChatStore.exe' -credential $cred
```
New-Object : 找不到接受实际参数“start-process”的位置形式参数。
所在位置 行:1 字符: 8
+ $cred =New-Object System.Management.Automation.PSCredential ($userNam ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-Object],ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.NewObjectCommand