I am stuck at this: The user needs to input two computer names and i don't know how to transfer them into one input (maybe i'm asking it wrong) but here is the code
elseif ($usersinput -eq 2)
{
$pingingtwopcs = Read-Host -Prompt "what are the names of the pc that >you want to ping? (please enter pc names in the next order with comma : >pc1,pc2)"
foreach ($pcs in $pingingtwopcs)
{
Test-Connection -computername $pcs -Count 1
}
}
Please don't provide the solution, if it is possible please direct me so I'll figure it out by my self.