@KM In both the cases i think this could be an issue with network connection. Is there any firewall running on your machine or is the machine hosted as a VM on a private network?
In the first case with WSL if you are using the speech SDK then you might need to configure openssl for linux for the SDK to work as expected.
In the second case with powershell I would assume you are trying to use the REST API but error code 10060 is received. Maybe, a simple call to get a token will help identify if you are able to hit the endpoint successfully.
$FetchTokenHeader = @{
'Content-type'='application/x-www-form-urlencoded';
'Content-Length'= '0';
'Ocp-Apim-Subscription-Key' = 'YOUR_SUBSCRIPTION_KEY'
}
$OAuthToken = Invoke-RestMethod -Method POST -Uri https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken
-Headers $FetchTokenHeader
# show the token received
$OAuthToken