我可以预先哈希一个Windows密码,并在创build帐户时通过哈希?

我使用Vagrant构build了一些Windows虚拟机,而Vagrantconfiguration器将创build一些用户。 我希望能够提交这些用户的密码来源控制,但显然我不想以纯文本提交它们。

在Linux上,我知道我可以在本地机器上创build一个哈希密码,然后用这个哈希密码创build一个新用户 – 我创build用户的服务器永远不会看到明文密码。

# Create the password hash: hashpass=$(echo 'P@ssword123' | mkpasswd --method=sha-512 --stdin) # Make a new user with the hash: useradd --password "$hashpass" <new username> 

有没有可能在Windows中做到这一点?