Get session ip addres
Hi!
How can i get ip address of the session? I need to do is something like: If Session IP is "192.168." Then MsgBox "Ok" Else MsgBox "Bad" End If |
Hi sind,
Thanks for the question. If you are connected to the session you could use the RemoteAddress property of the Session object. Would this work for you? If not, can you provide more specific details about your goal? |
I have a devices of different vendors in the different subnets. And I want to connect them with a script.
Login prompt they have the same. So I want to identify them at the session IP. Example: Code:
If Session IP is "192.168." Then |
Hi sind,
How are you going to be running this script? How does the script know what session is being used to connect? |
This script is set to the default session in program. I type IP address to connect bar and script starting.
|
Hello sind,
Thanks for the information. This sounds like it might be useful for other users, so here is an example: Code:
' Get handle to ad hoc session in tab created by script Does this help you accomplish your goal? |
Thanks. Works fine.
|
Hi sind,
Thanks for the confirmation. For those that see this and want to use it, it is necessary to define the script as a Logon script: in the Default Session. It is also necessary to enable Display logon prompts in terminal window. You can edit the Default Session by pressing the Edit Default Settings... button in the General / Default Session category of the Global Options dialog. Once you see the following dialog, select Change Default session only: --------------------------- |
All times are GMT -6. The time now is 02:26 PM. |