Can't resolve remote hostname from Powershell on Server 2008 R2 DC

1

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:\>

Velcro

Posted 2013-08-27T08:09:56.753

Reputation: 335

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? – a CVn – 2013-08-27T08:29:15.950

How do you know you can't? Ie. what result are you getting in PSH (including error messages)? – Richard – 2013-08-27T08:39:04.077

Can't ping Internet Oh noes, the internet is down! Also, post your code! – Austin T French – 2013-08-27T11:24:57.997

Yeah, ping is not the problem, resolving is. I updated my question. Also, resolving works from regular command line. – Velcro – 2013-08-27T11:41:43.670

Answers

0

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

Velcro

Posted 2013-08-27T08:09:56.753

Reputation: 335