Hello. I want to make a list of TCP hosts in an Excel book and test connection by Test-NetConnection. It looks as follow -
Dim a
Dim b As Boolean
Set a = CreateObject("WScript.Shell")
b = a.Run("powershell TNC 192.168.26.10 -CommonTCPPort RDP -InformationLevel Quiet", 0, True)
it works, powershell runs, TNC works and returns True/False if port is opened or closed.
But! it doesn't return correct result to b. It always returnes FALSE if syntax is correct and TRUE if syntax is wrong.
It does not return the result of test connection. Whether the port is open or closed b is FALSE.
If anyone knows how to make TNC return the correct answer please tell me
Dim a
Dim b As Boolean
Set a = CreateObject("WScript.Shell")
b = a.Run("powershell TNC 192.168.26.10 -CommonTCPPort RDP -InformationLevel Quiet", 0, True)
it works, powershell runs, TNC works and returns True/False if port is opened or closed.
But! it doesn't return correct result to b. It always returnes FALSE if syntax is correct and TRUE if syntax is wrong.
It does not return the result of test connection. Whether the port is open or closed b is FALSE.
If anyone knows how to make TNC return the correct answer please tell me