Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Query user id return computer name

Reply
 
Old 12-24-2008   #1 (permalink)
DanF


 
 

Query userid return cmpuer name

New to PowerShell, new to AD
What I would like to do is enter a users windows ID for a user who is logged
on to a domain and have the computer name returned. Is this possible?
Pointers on how to accomplish this would be welcomed.


My System SpecsSystem Spec
Old 12-24-2008   #2 (permalink)
Thomas Lee


 
 

Re: Query userid return cmpuer name

In message <E5DA4356-CB81-4FE3-B4A9-5AD31C5576B5@xxxxxx>, DanF
<DanF@xxxxxx> writes
Quote:

>New to PowerShell, new to AD
>What I would like to do is enter a users windows ID for a user who is logged
>on to a domain and have the computer name returned. Is this possible?
>Pointers on how to accomplish this would be welcomed.
You can't do it.

First, there really is no concept of someone who is logged in, at least
from the domain persepective. The client knows it's logged in (it has a
secure connection - IPC$ - to the DC) but the DC does not keep track of
who's logged in at the current moment. It gets more complex in multi-dc
environnments where one DC logs you on, and another responds to the
query. Finally, the DC does not keep track of which system you are
logged in on (you could be logged in to several - As I write this, I'm
logged to my laptop, my workstation, two servers and a DC twice (once on
the box and once via TS).

HTH.
--
Thomas Lee
doctordns@xxxxxx

My System SpecsSystem Spec
Old 12-24-2008   #3 (permalink)
PaulChavez


 
 

Query user id return computer name

I forget whose blog I saw this on but someone has a script to update the
computer description field with a logon script when a user logs on.

That way you can query AD on the description field to find a user. It's
probably the easiest method I've seen to track logged on users.



"DanF" wrote:
Quote:

> New to PowerShell, new to AD
> What I would like to do is enter a users windows ID for a user who is logged
> on to a domain and have the computer name returned. Is this possible?
> Pointers on how to accomplish this would be welcomed.
>
My System SpecsSystem Spec
Old 12-24-2008   #4 (permalink)
Thomas Lee


 
 

Re: Query userid return cmpuer name

In message <A6FA0629-B1B1-468C-9D66-4759D4EEB458@xxxxxx>,
PaulChavez <PaulChavez@xxxxxx> writes
Quote:

>I forget whose blog I saw this on but someone has a script to update the
>computer description field with a logon script when a user logs on.
That would sort of work. But it would be not totally accurate - there's
no way to ensure this is up to date. If a user shuts the lid on a laptop
or pulls power on a desktop - there's no way to track that.
Quote:

>That way you can query AD on the description field to find a user. It's
>probably the easiest method I've seen to track logged on users.
To some degree, using OCS would be better (assuming all users were
logged into communicator.

Thomas
--
Thomas Lee
doctordns@xxxxxx
MVP - Admin Frameworks and Security
My System SpecsSystem Spec
Old 12-27-2008   #5 (permalink)
Rob Campbell


 
 

RE: Query userid return cmpuer name

Got WINS?

"DanF" wrote:
Quote:

> New to PowerShell, new to AD
> What I would like to do is enter a users windows ID for a user who is logged
> on to a domain and have the computer name returned. Is this possible?
> Pointers on how to accomplish this would be welcomed.
>
My System SpecsSystem Spec
Old 12-28-2008   #6 (permalink)
Rob Campbell


 
 

RE: Query userid return cmpuer name

Got WINS?

"DanF" wrote:
Quote:

> New to PowerShell, new to AD
> What I would like to do is enter a users windows ID for a user who is logged
> on to a domain and have the computer name returned. Is this possible?
> Pointers on how to accomplish this would be welcomed.
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Return computer name VB Script
How to combine/return multiple values from a sql query VB Script
Query csv and return all entries within last x days VB Script
Re: A REG QUERY that does not return "ERROR" when key not found VB Script
query about User Folders. Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46