从WDS远程列出图像

时间:2018-09-03 08:42:38

标签: image powershell wds

我不会从WDS服务器(Windows部署服务)远程获取图像列表。 但我对此有疑问。 我正在使用powershell命令Get-WdsInstallImage,它需要最高特权。 我在下面的命令中尝试过,但是它们不起作用:

invoke-command -computername wdsname -authentication kerberos -credential $(get-credential) -scriptblock {Get-WdsInstallImage} -可以,但是不返回任何内容,只能远程运行,而没有其他操作

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

试试这个:

$w=Get-WmiObject -ComputerName "<target system>" -Namespace "root\CIMV2" -Class "MSFT_WdsBootImage" -EnableAllPrivileges -List
$x=$w.Get()
$x.cmdletOutput

$y=Get-WmiObject -ComputerName "<target system>" -Namespace "root\CIMV2" -Class "MSFT_WdsInstallImage" -EnableAllPrivileges -List
$z=$y.Get()
$z.cmdletOutput

如有必要,请不要忘记使用 -Credentials