【发布时间】:2018-01-09 23:12:50
【问题描述】:
我正在尝试使用 Windows Server 2016 实现自动化。
现在我无法通过PowerShell Direct 访问syspreped 虚拟机,因为您必须为管理员帐户设置密码。如何访问此服务器?
【问题讨论】:
-
您是在问如何传递凭据? AFAICS
Invoke-Command -VMName S2D1 -Scriptblock {...} -Credential (Get-Credential)应该这样做。 -
@AnsgarWiechers 但问题是我没有密码,也没有因为是 sysprepred
-
那么你的问题是如何创建一个密码为空的凭证对象?
-
@AnsgarWiechers 这不是一个空密码是 NO SET 解决方案是在 sysprepd 之后运行脚本或类似的想法
-
@AnsgarWiechers community.spiceworks.com/topic/…
标签: windows powershell hyper-v windows-server-2016 sysprep