Try with address in single quotes
powershell.exe [System.Net.Dns]::GetHostEntry('192.168.1.100')
Question
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.
Solution
Try with address in single quotes
powershell.exe [System.Net.Dns]::GetHostEntry('192.168.1.100')