【发布时间】:2016-02-16 18:19:44
【问题描述】:
我已经这样做了,但它没有给我想要的东西。
Get-BrokerDesktop -MaxRecordCount 1000 | select "DesktopGroupName" | Export-Csv c:\dektop_list
我只希望获得发布桌面的交付组。如果它是一个已发布的应用交付组,我不希望它包含在列表中。
提前致谢。
$DG = Get-BrokerDesktopGroup
foreach($item in $DG)
{
if (DeliveryType = "DesktopsOnly")
{
Add-Content C:\dektop_list.csv
}
else
{
Add-Content c:\application_delivery.csv
}
}
我收到一条错误消息,提示“DeliveryType:‘DeliveryType’一词未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,或者如果 路径已包含,请验证路径是否正确,然后重试。”
【问题讨论】:
-
$DG = Get-BrokerDesktopGroup -MaxRecordCount 10000 | Where-Object {$_.DeliveryType -like "Desktopsandapps" -and "DesktopsOnly"} |选择对象“PublishedName”这就是我要去的地方。但它没有找到 Desktopsandapps 和 DesktopsOnly
-
这是最终命令 $DG = Get-BrokerDesktopGroup -MaxRecordCount 10000 | Where-Object {$_.DeliveryType -like "DesktopsOnly" -or $_.DeliveryType -like "DesktopsAndApps" } |选择对象“PublishedName”
-
所以你还好吗?您的命令有效吗?如果有效,请更新答案并接受它...
标签: powershell citrix xendesktop