How to Create Aliases for Commands in Windows

The easiest way to create command aliases in Windows is by using doskey command.

C:>doskey p=ping $*
C:>p 4.2.2.2
Pinging 4.2.2.2 with 32 bytes of data:
Reply from 4.2.2.2: bytes=32 time=14ms TTL=55
Reply from 4.2.2.2: bytes=32 time=14ms TTL=55
Reply from 4.2.2.2: bytes=32 time=14ms TTL=55
Reply from 4.2.2.2: bytes=32 time=14ms TTL=55
Ping statistics for 4.2.2.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 14ms, Maximum = 14ms, Average = 14ms
C:>

Use doskey /? for further information.

Published by

Rich

Just another IT guy.

Leave a Reply

Your email address will not be published. Required fields are marked *