you may use Command line v2 task
so you can ping the target you want (but as a note you need to open icmp ports at first)
or you can use Powershell task and you can run powershell script to test the connectivity
but for each resource it is better to create different tast to test the connectivity
like you can test a rest api by using curl or powershell or telnet etc.