Control Panel -- System and security -- Windows Firewall -- Advanced settings -- Inbound rules -- New rule -- custom rule
in Protocol and ports: Protocol: ICMPv4
on the same panel go to customize, choose "Specific ICMP types", check the box "echo request"
... next... next... and save it
Click start, and type windows powershell, and hit enter. run the commands get-help and get-help about_remote or ... about_pssessions
You are going to find a lot more than the OS type is available.
A commandlet for the whole process is just what you need.
In addition to the Help available at the command line, the following resources provide more information.
Windows PowerShell SDK. Provides reference content used to develop cmdlets, providers, and hosting applications.
Windows PowerShell Programmer's Guide. Provides tutorials for creating cmdlets, providers, and hosting applications. Also contains information about fundamental Windows PowerShell concepts.