0

This works perfect in CMD:

C:\>powershell.exe write-host -Foreground Red "hello"

But I have problem running this command:

C:\>powershell.exe [System.Net.Dns]::GetHostEntry("192.168.1.100")

I've already tried adding the -command options but still getting an error. Thanks in advance.

1
  • Can you post the error? Commented May 1, 2014 at 10:40

1 Answer 1

1

Try with address in single quotes

powershell.exe [System.Net.Dns]::GetHostEntry('192.168.1.100')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.