Windows Vista Forums

Query user id return computer name

  1. #1


    DanF Guest

    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

  2. #2


    Thomas Lee Guest

    Re: Query userid return cmpuer name

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

    >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

  3. #3


    PaulChavez Guest

    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:

    > 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

  4. #4


    Thomas Lee Guest

    Re: Query userid return cmpuer name

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

    >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@xxxxxx
    MVP - Admin Frameworks and Security

      My System SpecsSystem Spec

  5. #5


    Rob Campbell Guest

    RE: Query userid return cmpuer name

    Got WINS?

    "DanF" wrote:

    > 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

  6. #6


    Rob Campbell Guest

    RE: Query userid return cmpuer name

    Got WINS?

    "DanF" wrote:

    > 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

Query user id return computer name

Similar Threads
Thread Thread Starter Forum Replies Last Post
Return computer name James VB Script 4 18 Aug 2009
How to combine/return multiple values from a sql query Holly VB Script 1 01 Apr 2009
Query csv and return all entries within last x days tstar31 VB Script 1 17 Jul 2008
Re: A REG QUERY that does not return "ERROR" when key not found HAL07 VB Script 0 22 May 2008
query about User Folders. Neerav Vista General 2 09 Jan 2008