質問

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.

役に立ちましたか?

解決

Try with address in single quotes

powershell.exe [System.Net.Dns]::GetHostEntry('192.168.1.100')
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top