Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Ip Address

Posted on 2012-03-29
6
289 Views
Last Modified: 2012-03-29
I have computers running TS session. I need a script (which will run for their TS Desktop) to give me the IP address of their local computer rather than the server they are connected to

Thanks
Cheers
0
Comment
Question by:Bianchi928
  • 3
  • 2
6 Comments
 
LVL 22

Expert Comment

by:chakko
ID: 37785288
Here is a small program that will report the client IP address.  You can use a batch file to run it.

http://www.ctrl-alt-del.com.au/files/GETTSCIP.zip
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 37785447
0
 

Author Comment

by:Bianchi928
ID: 37785604
That's perfect Rob. Before I give you the marks, should I open a new question or is it possible for you to help me to get the default network printer ip address they're connected to while in TS Mode

Thanks
Cheers
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 65

Accepted Solution

by:
RobSampson earned 200 total points
ID: 37785619
If you add this, does it show the port name of the default printer in terminal server?

Rob.

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT PortName FROM Win32_Printer WHERE Default=True", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
	WScript.Echo "PortName: " & objItem.PortName
Next

Open in new window

0
 

Author Closing Comment

by:Bianchi928
ID: 37785650
Absolute legend

All good mate
Thanks
Cheers
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 37785677
No problem. Thanks for the grade.

Rob.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question