大家早上好,
我对远程执行"Get-AppVServerPackage"PowerShell Applet有一点问题。
我们尝试从远程位置接收所有包裹的所有可用信息。
在 AppV 服务器上执行"Get-AppVServerPackage"时,我得到: 有关所包含应用程序的信息。
[1] https://i.stack.imgur.com/pIx4m.png
当我从PowerShell命令行使用Enter-PSSession时,我得到
[2] https://i.stack.imgur.com/GvEtc.png
当我尝试在应该无人值守运行的脚本中使用它时,我得到
[3] https://i.stack.imgur.com/m8Ddf.png
所以我试图获取有关"Microsoft.AppV.Server.AppVMgmtDataTypes.Application"的更多信息
$s = New-PSSession -computerName myAppVServer -Authentication Kerberos
$test = Invoke-Command -Session $s -ScriptBlock { Get-AppVServerPackage }
$test.Applications[0] |gm
会给我一长串方法,只有一个属性"长度"。
谁能告诉我如何获得有关应用程序的信息?它适用于
$test.Entitlements
会给我一个我可以处理的结果。
多谢! 霍尔格
有时你会很幸运,
取代
{ Get-AppVServerPackage }
跟
{ Get-AppVServerPackage | Select ID, Name, Description, PackageGuid, VersionGuid, Applications, Entitlements }
解决了问题。