回复 2# idwma
谢谢大佬,我在PS运行正常,但是转到批处理调用就出错,帮我看看是哪里的问题?- @echo off
- powershell "$Password = New-Object Security.SecureString"
- powershell "$a='123456'"
- powershell "0..($a.Length-1)|%{$Password.AppendChar($a[$_])}"
- powershell "New-LocalUser "工程部" -Password $Password -FullName "工程部" -Description "工程部""
- pause > NUL
复制代码
|