#说明:
"10.100.20.10"= DDC地址
"会话设置"=策略名称
"LocalFarmGpo"= 驱动器名称
-----------------------------------------------------------------------------------------------------------
#导入Citrix GroupPolicy模块
import-module "C:\Program Files\Citrix\Telemetry Service\TelemetryModule\Citrix.GroupPolicy.Commands.psm1"
#新建驱动
New-PSDrive -Name LocalFarmGpo -PSProvider CitrixGroupPolicy -Controller "10.100.20.10" \
#查询策略名称属性, 例如策略名称为:"会话设置"
Get-CtxGroupPolicy -DriveName "LocalFarmGpo" | Where-Object {$_.PolicyName -match "会话设置"} | Select-Object -Property *
#查询策略分配属性
Get-CtxGroupPolicyFilter -DriveName "LocalFarmGpo" | Where-Object {$_.PolicyName -match "会话设置"} | Select-Object -Property *
#查询策略配置属性
Get-CtxGroupPolicyConfiguration -PolicyName "会话设置" -ConfiguredOnly -DriveName "LocalFarmGpo"
-----------------------------------------------------------------------------------------------------------
执行结果如下
PolicyName : 会话设置
Type : Computer
Description : 会话设置
Enabled : True
Priority : 6
PolicyName : 会话设置
Type : Computer
FilterName : DesktopGroupFilter0
FilterType : DesktopGroup
Enabled : True
Mode : Allow
FilterValue : 办公桌面
PolicyName : 会话设置
Type : Computer
SessionReliabilityConnections : @{State=Allowed; Path=ICA\SessionReliability\SessionReliabilityConnections}
SessionReliabilityPort : @{State=Enabled; Value=2598; Path=ICA\SessionReliability\SessionReliabilityPort}
SessionReliabilityTimeout : @{State=Enabled; Value=180; Path=ICA\SessionReliability\SessionReliabilityTimeout}
#删除驱动
Remove-PSDrive -Name LocalFarmGpo
---------------------------------------------------------------------------------------------------------------------
标签:PolicyName,Powersehll,查看,Object,Enabled,会话,LocalFarmGpo,设置,Citrix
From: https://blog.51cto.com/dengpeng2025/7352566