Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 10374

Errors while reading policies from this GPO, not all policies are displayed

$
0
0

I am working on implementing an automatic Quality of Service (QoS) policy creator using the "New-NetQosPolicy" PowerShell command. I have a C++ script that executes this command to limit the bandwidth for specific applications, such as Firefox.

Here is the command I'm using: "New-NetQosPolicy -Name firefox.exe -AppPathNameMatchCondition "firefox.exe" -ThrottleRateActionBitsPerSecond 5MB -IPProtocolMatchCondition Both -NetworkProfile All"

Here is the script:

//create QoS policystd::string command = "powershell New-NetQosPolicy -Name " + appName +" -AppPathNameMatchCondition \"" + appName +"\" -ThrottleRateActionBitsPerSecond " + std::to_string(bandwidthLimit) +"MB -IPProtocolMatchCondition Both -NetworkProfile All";std::cout << command << std::endl;system(command.c_str());qosNames.push_back(appName);std::cout << "Bandwidth limit applied for " << appName << ": " << bandwidthLimit << " Kbps" << std::endl;

After running the command, I can see the policy in the output of the "Get-NetQosPolicy" command, and it looks to be configured properly.

Here is the output:

Name: firefox.exeOwner : Group Policy(Machine)NetworkProfile : AllPrecedence : 127AppPathName : firefox.exeJobObject :IPProtocol: BothThrottleRate : 5.243 MBits / sec

However, the QoS policy doesn't seem to be applied to Firefox. When I try to view the policy in the Group Policy Editor, I encounter the error: "Errors while reading policies from this GPO, not all policies are displayed." upon clicking the policy tab.

Though, when I manually set up the QoS, it seems to work fine. I'm hoping someone has a solution to my problem or knows how to create these policies with registry edit commands. Any insights on why this may be happening would be greatly appreciated.

If helpful I have attached a custom view of the event log during my testing here, It contains the creation of a QoS with the same command provided above.


Viewing all articles
Browse latest Browse all 10374

Latest Images

Trending Articles



Latest Images