使用powershell将用户从Citrix交付组中移除

citrix交付组的名称为win10,使用powershell命令将交租组中指定的用户删除

步骤如下:

步骤一:要使用的Citrix的powershell模块,要加载asnp citirx*

PS C:\Windows\system32> asnp citrix*

步骤二:

使用以下命令查看交付组的访问策略
PS C:\Windows\system32> Get-BrokerAccessPolicyRule -DesktopGroupName win10


AllowRestart                     : True
AllowedConnections               : ViaAG
AllowedProtocols                 : {HDX, RDP}
AllowedUsers                     : Filtered
Description                      :
DesktopGroupName                 : win10
DesktopGroupUid                  : 2
Enabled                          : True
ExcludedClientIPFilterEnabled    : False
ExcludedClientIPs                : {}
ExcludedClientNameFilterEnabled  : False
ExcludedClientNames              : {}
ExcludedSmartAccessFilterEnabled : False
ExcludedSmartAccessTags          : {}
ExcludedUserFilterEnabled        : False
ExcludedUsers                    : {}
HdxSslEnabled                    : False
IncludedClientIPFilterEnabled    : False
IncludedClientIPs                : {}
IncludedClientNameFilterEnabled  : False
IncludedClientNames              : {}
IncludedSmartAccessFilterEnabled : True
IncludedSmartAccessTags          : {}
IncludedUserFilterEnabled        : True
IncludedUsers                    : {KYDX\ctxadmin, KYDX\chem07}
MetadataMap                      : {}
Name                             : win10_AG
Uid                              : 4

AllowRestart                     : True
AllowedConnections               : NotViaAG
AllowedProtocols                 : {HDX, RDP}
AllowedUsers                     : Filtered
Description                      :
DesktopGroupName                 : win10
DesktopGroupUid                  : 2
Enabled                          : True
ExcludedClientIPFilterEnabled    : False
ExcludedClientIPs                : {}
ExcludedClientNameFilterEnabled  : False
ExcludedClientNames              : {}
ExcludedSmartAccessFilterEnabled : False
ExcludedSmartAccessTags          : {}
ExcludedUserFilterEnabled        : False
ExcludedUsers                    : {}
HdxSslEnabled                    : False
IncludedClientIPFilterEnabled    : False
IncludedClientIPs                : {}
IncludedClientNameFilterEnabled  : False
IncludedClientNames              : {}
IncludedSmartAccessFilterEnabled : True
IncludedSmartAccessTags          : {}
IncludedUserFilterEnabled        : True
IncludedUsers                    : {KYDX\ctxadmin, KYDX\chem07}
MetadataMap                      : {}
Name                             : win10_Direct
Uid                              : 3
 

步骤三:

使用Set-BrokerAccessPolicyRule  -RemoveIncludeUsers  "KYDX\chem07"   移除交付组中的用户chem07

PS C:\Windows\system32> Get-BrokerAccessPolicyRule -DesktopGroupName win10 | Set-BrokerAccessPolicyRule -RemoveIncludedUsers "KYDX\chem07"

步骤四:

再次查看win10交付组中的现有用户,结果IncludedUsers  : {KYDX\ctxadmin},以此验证使用命令从交付组中移除用户成功了。

PS C:\Windows\system32> Get-BrokerAccessPolicyRule -DesktopGroupName win10


AllowRestart                     : True
AllowedConnections               : ViaAG
AllowedProtocols                 : {HDX, RDP}
AllowedUsers                     : Filtered
Description                      :
DesktopGroupName                 : win10
DesktopGroupUid                  : 2
Enabled                          : True
ExcludedClientIPFilterEnabled    : False
ExcludedClientIPs                : {}
ExcludedClientNameFilterEnabled  : False
ExcludedClientNames              : {}
ExcludedSmartAccessFilterEnabled : False
ExcludedSmartAccessTags          : {}
ExcludedUserFilterEnabled        : False
ExcludedUsers                    : {}
HdxSslEnabled                    : False
IncludedClientIPFilterEnabled    : False
IncludedClientIPs                : {}
IncludedClientNameFilterEnabled  : False
IncludedClientNames              : {}
IncludedSmartAccessFilterEnabled : True
IncludedSmartAccessTags          : {}
IncludedUserFilterEnabled        : True
IncludedUsers                    : {KYDX\ctxadmin}
MetadataMap                      : {}
Name                             : win10_AG
Uid                              : 4

AllowRestart                     : True
AllowedConnections               : NotViaAG
AllowedProtocols                 : {HDX, RDP}
AllowedUsers                     : Filtered
Description                      :
DesktopGroupName                 : win10
DesktopGroupUid                  : 2
Enabled                          : True
ExcludedClientIPFilterEnabled    : False
ExcludedClientIPs                : {}
ExcludedClientNameFilterEnabled  : False
ExcludedClientNames              : {}
ExcludedSmartAccessFilterEnabled : False
ExcludedSmartAccessTags          : {}
ExcludedUserFilterEnabled        : False
ExcludedUsers                    : {}
HdxSslEnabled                    : False
IncludedClientIPFilterEnabled    : False
IncludedClientIPs                : {}
IncludedClientNameFilterEnabled  : False
IncludedClientNames              : {}
IncludedSmartAccessFilterEnabled : True
IncludedSmartAccessTags          : {}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值