Solved

Ip Address

Posted on 2012-03-29
6
293 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
[X]
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
  • 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
 

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
Welcome back!  My apologies for taking so long to write part two of this series; it's been a long time coming!  As I promised in Part 1, this article will focus on how to locate those elusive AD properties that you are searching for.  Why is this us…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 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