【问题标题】:Can't acces to syspreped VM无法访问 sysprep 虚拟机
【发布时间】:2018-01-09 23:12:50
【问题描述】:

我正在尝试使用 Windows Server 2016 实现自动化。 现在我无法通过PowerShell Direct 访问syspreped 虚拟机,因为您必须为管理员帐户设置密码。如何访问此服务器?

PS> icm -VMName S2D1 { ipconfig } 命令管道位置 1 处的 cmdlet Invoke-Command 为以下参数提供值: 凭据无效。 + CategoryInfo : OpenError: (S2D1:String) [], PSDirectException + FullyQualifiedErrorId : PSSessionStateBroken

【问题讨论】:

  • 您是在问如何传递凭据? AFAICS Invoke-Command -VMName S2D1 -Scriptblock {...} -Credential (Get-Credential) 应该这样做。
  • @AnsgarWiechers 但问题是我没有密码,也没有因为是 sysprepred
  • 那么你的问题是如何创建一个密码为空的凭证对象?
  • @AnsgarWiechers 这不是一个空密码是 NO SET 解决方案是在 sysprepd 之后运行脚本或类似的想法

标签: windows powershell hyper-v windows-server-2016 sysprep


【解决方案1】:

我必须使用 Windows SIM(系统映像管理器)创建一个应答文件,它是 Windows 10 的一部分ADK
我必须通过将答案文件安装在 Windows 10 中,然后将 unattend.xml 文件放置在路径 C:\Windows\Panther

中来将答案文件放置在 VHDX 中

来源:http://www.altaro.com

【讨论】:

    猜你喜欢
    • 2014-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-05
    • 2017-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多