Jump to content
Welcome to our new Citrix community!
  • 0

Setting policy priority with Powershell


Martijn Kools

Question

Hi all,

 

XenApp 7.6 still suffers from the problem where if you change the priority of a policy it takes a very long time to complete. In XenApp 6.5 I could just open Powershell and type something like:

 

Set-CtxGroupPolicy "Printerpolicy" user -Priority "22" 

 

Any idea how to do the same in XenApp 7.6?

 

I've tried the same Citrix Grouppolicy Commands from Citrix Scout but they error out.

Thanks.

 

Link to comment

8 answers to this question

Recommended Posts

  • 3

Sorry for not updating this topic, I found the solution. 

 

  • Start Powershell, type: Set-ExecutionPolicy Unrestricted
  • CD into the scout utilites folder, e.g. c:\Scout\Current\Utilities
  • Import-Module .\Citrix.GroupPolicy.Commands.psm1
  • New-PSDrive -PSProvider CitrixGroupPolicy -Name LocalFarmGPO -Root \ -DomainGpo "DomainGPO_name"
  • Set-CtxGroupPolicy "Printer" user -Priority "17"

 

 

This is for when you use Citrix policies in Domain GPOs like we do. If you use farmgpos then use -FarmGpo followed by the delivery controller to connect to.

 

Hope this helps some people.

  • Like 4
Link to comment
  • 0

Surprised there's been no activity on this thread.

 

I'm in the same boat with over 100 policies (thanks to a customer with very specific printer assignment policies) and need to get a new one to the top (priority 1). It's going to take forever through the GUI, one priority at a time :(

 

I've looked through the PS reference doco and also poked around in the modules (in case it's undocumented) but can't find anything.

Link to comment
  • 0
On ‎09‎/‎09‎/‎2015 at 10:25 PM, Martijn Kools said:

Sorry for not updating this topic, I found the solution. 

 

  • Start Powershell, type: Set-ExecutionPolicy Unrestricted
  • CD into the scout utilites folder, e.g. c:\Scout\Current\Utilities
  • Import-Module .\Citrix.GroupPolicy.Commands.psm1
  • New-PSDrive -PSProvider CitrixGroupPolicy -Name LocalFarmGPO -Root \ -DomainGpo "DomainGPO_name"
  • Set-CtxGroupPolicy "Printer" user -Priority "17"

 

 

This is for when you use Citrix policies in Domain GPOs like we do. If you use farmgpos then use -FarmGpo followed by the delivery controller to connect to.

 

Hope this helps some people.

 

Hi

 

Sorry to ask you.   I have setting Citrix Policy on Controller (Broker01's name).  I do not clear about "New-PSDrive -PSProvider CitrixGroupPolicy -Name LocalFarmGPO -Root \ -DomainGpo "DomainGPO_name "

 

Could you advise me how to type to use with Local Citrix Policy on Controller only?  I try to run it but it's failed. 

 

Regards,

 

 

Link to comment
  • 0

Folks on 1912LTSR the Citrix Group Policy Powershell Module is already available local

Complete command - use controller for Studio driven policies

Import-module 'C:\Program Files\CITRIX\Telemetry Service\TelemetryModule\Citrix.GroupPolicy.Commands.psm1'
New-psdrive -name Controller -psprovider CitrixGroupPolicy -controller localhost \

test - you will need the Type parameter "Computer or User"
Set-CtxGroupPolicy -PolicyName "PolicyName" -Type user -Priority "340" -verbose

Validate that change successfully applied
get-ctxgrouppolicy -policyname "PolicyName"

check the newly created PSDrive
Get-PSDrive -name Controller | ft -auto

Edited by Edgar Marcha
change description
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...