none
Get/Set-NetQosPolicy with GPOs does not work

    Question

  • Hi,

       I am trying to set the QoS policy in a GPO via P$; I am using the latest patched 2012R2 Windows P$. I have noticed that when you run the command and use the switch -PolicyStore GPO:DOMAIN\GPONAME the command does not work. Bug ??

       If you type an incorrect/non-existant GPONAME the command returns an error correctly saying:

    PS C:\> Get-NetQosPolicy -PolicyStore GPO:DOMAIN\GPONAME
    Get-NetQosPolicy : Group policy object not found on domain controller.

       If however you enter an existing GPONAME, the command simply returns without giving any error or output (regardless of whether or not the GPO has a policy in it).

       Further, if you try and set/new a policy in a GPO the command returns a very odd error:

    PS C:\> new-netQoSPolicy -Name "TestPolicy" -IPProtocolMatchCondition TCP -DSCPValue 24 -Port 5067 -PolicyStore GPO:DOMAIN\GPONAME
    new-netQoSPolicy : The system cannot find the file specified.

    Any Ideas ? I know I can use the Set-GPPrefRegistryValue or Set-GPRegistryValue; but I was looking for a neater way of doing this.

    Thursday, March 12, 2015 10:15 PM

Answers

  • >     If however you enter an existing GPONAME, the command simply returns
    > without giving any error or output (regardless of whether or not the GPO
    > has a policy in it).
     
    Try " | get-member" to see if it returns anything...
     
    > PS C:\> new-netQoSPolicy -Name "TestPolicy" -IPProtocolMatchCondition TCP -DSCPValue 24 -Port 5067 -PolicyStore GPO:DOMAIN\GPONAME
    > new-netQoSPolicy : The system cannot find the file specified.
     
    Suppose that's ok - this cmdlet creates a QoS policy, but possibly is
    not able to create the GPO that contains this QoS policy. So use new-gpo
    in advance :)
     

    Martin

    Mal ein GUTES Buch über GPOs lesen?

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))
    Friday, March 13, 2015 8:29 AM

All replies

  • >     If however you enter an existing GPONAME, the command simply returns
    > without giving any error or output (regardless of whether or not the GPO
    > has a policy in it).
     
    Try " | get-member" to see if it returns anything...
     
    > PS C:\> new-netQoSPolicy -Name "TestPolicy" -IPProtocolMatchCondition TCP -DSCPValue 24 -Port 5067 -PolicyStore GPO:DOMAIN\GPONAME
    > new-netQoSPolicy : The system cannot find the file specified.
     
    Suppose that's ok - this cmdlet creates a QoS policy, but possibly is
    not able to create the GPO that contains this QoS policy. So use new-gpo
    in advance :)
     

    Martin

    Mal ein GUTES Buch über GPOs lesen?

    NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))
    Friday, March 13, 2015 8:29 AM
  • Hi Hany,

    Do you have any update on this?

    Looking forward to your reply.

    Best Regards,

    Elaine


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, March 16, 2015 3:27 AM
    Moderator