Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: General » microsoft.public.windows.powershell
Thread: Query userid return cmpuer name

HTVi
TV Discussion Newsgroups

Query userid return cmpuer name
DanF 12/24/2008 2:38:00 PM
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.

Re: Query userid return cmpuer name
Thomas Lee <tfl[ at ]psp.co.uk> 12/24/2008 4:08:49 PM
In message <E5DA4356-CB81-4FE3-B4A9-5AD31C5576B5[ at ]microsoft.com>, DanF
<DanF[ at ]discussions.microsoft.com> writes
[Quoted Text]
>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[ at ]gmail.com

RE: Query userid return cmpuer name
PaulChavez 12/24/2008 6:06:00 PM
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:

[Quoted Text]
> 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.
>
Re: Query userid return cmpuer name
Thomas Lee <tfl[ at ]psp.co.uk> 12/24/2008 11:23:50 PM
In message <A6FA0629-B1B1-468C-9D66-4759D4EEB458[ at ]microsoft.com>,
PaulChavez <PaulChavez[ at ]discussions.microsoft.com> writes
[Quoted Text]
>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.

>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[ at ]gmail.com
MVP - Admin Frameworks and Security
RE: Query userid return cmpuer name
Rob Campbell 12/28/2008 1:13:00 AM
Got WINS?

"DanF" wrote:

[Quoted Text]
> 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.
>
RE: Query userid return cmpuer name
Rob Campbell 12/28/2008 3:55:01 PM
Got WINS?

"DanF" wrote:

[Quoted Text]
> 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.
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen