I am learning ping utility in Windows 10 and when I try to run command in shell:

ping -c 3 example.com

I get the result:

Access denied. Option -c requires administrative privileges.

After executing from the administrator I get:

Bad value for option -c.

The command reference (ping /?) says about this argument:

  • [-c compartment] - Routing compartment identifier.

What does that mean? What values can this argument take?

However, -c is not mentioned on the Microsoft website!

I also tried to use this command like this: ping -c google.com Output:

Pinging with 32 bytes of data:
Reply from bytes=32 time=127ms TTL=58
Reply from bytes=32 time=57ms TTL=58
Reply from bytes=32 time=57ms TTL=58
Reply from bytes=32 time=57ms TTL=58

Ping statistics for
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 57ms, Maximum = 127ms, Average = 74ms

There was no error, but the result is the same as the command ping

So, how do I use ping -c correctly in Windows?


1 Answer 1


It seems that you're using the -c parameter to stand for the count of ping requests. Under Windows the parameter is (default is 3):

-n count       Number of echo requests to send.

You may see all the parameters by using the command ping /?.

For the question about compartments :

Compartments are just relics of the earlier plans of supporting routing compartments in Windows Vista. Routing compartments were not re-introduced in later versions of Windows.

Some of the Windows commands still support parameters for compartments, dating from that partial implementation that was never finished, such as -c on ping, but these produce either errors or unusable information:

Ipconfig /allcompartments
Netsh interface ipv4 show compartments
Netsh interface ipv4 set compartment…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.