Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm going across a problem in Powershell: I can't ping websites.

Command line works properly but Powershell seems to be unable to resolve remote hostname. In Powershell I can ping local computers in IPv4 and IPv6.

I'm doing this from a domain controller which is connected to a proxy.

Where could the problem comes from?

UPDATE

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. Tous droits réservés.

C:\> ping 8.8.8.8

Envoi d'une requête 'Ping'  8.8.8.8 avec 32 octets de données :
Réponse de 8.8.8.8 : octets=32 temps=27 ms TTL=47
Réponse de 8.8.8.8 : octets=32 temps=27 ms TTL=47
Réponse de 8.8.8.8 : octets=32 temps=27 ms TTL=47
Réponse de 8.8.8.8 : octets=32 temps=27 ms TTL=47

Statistiques Ping pour 8.8.8.8:
    Paquets : envoyés = 4, reçus = 4, perdus = 0 (perte 0%),
Durée approximative des boucles en millisecondes :
    Minimum = 27ms, Maximum = 27ms, Moyenne = 27ms
C:\> ping google.fr
La requête Ping n'a pas pu trouver l'hôte google.fr. Vérifiez le nom et essayez
à nouveau.
C:\> nslookup google.fr
Serveur :   UnKnown
Address:  fec0:0:0:ffff::1

*** UnKnown ne parvient pas à trouver google.fr : No response from server
C:\>
share|improve this question
    
So is the problem that name resolution fails (try something like nslookup superuser.com), or is the problem that you can't ping outside hosts (try ping 8.8.8.8 or your ISP's gateway IP)? The two are very different. Also, is this specific to Powershell or is it the same trying from the regular command prompt? –  Michael Kjörling Aug 27 '13 at 8:29
    
How do you know you can't? Ie. what result are you getting in PSH (including error messages)? –  Richard Aug 27 '13 at 8:39
    
Can't ping Internet Oh noes, the internet is down! Also, post your code! –  AthomSfere Aug 27 '13 at 11:24
    
Yeah, ping is not the problem, resolving is. I updated my question. Also, resolving works from regular command line. –  Velcro Aug 27 '13 at 11:41
add comment

1 Answer

PowerShell couldn't resolve anything because I didn't specified DNS server IP. On a DC you can let a blank field (so the server own IP address is used by Windows), but PowerShell reads the real value (so no DNS IP address).

You have to set DNS server IP in order to PowerShell to work.

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.