Re: I want to add fields to user report
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 03/17/05
- Next message: RogueIT: "Re: Naming files from an Array"
- Previous message: Roger Abell: "Re: Setting special permission on files and folders from a script"
- In reply to: Randy Reimers: "I want to add fields to user report"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Mar 2005 21:20:12 +0100
Randy Reimers wrote:
> I have a script that helps me document my part of Active Directory. The
> existing script works well, but I would like to add some more fields to it.
> We are in a native mode 2003 AD forest. I would like to add these:
> When created
The whenCreated attribute:
http://groups.google.co.uk/groups?as_q=CreateObject%20whenCreated%20%20LDAP&safe=images&as_scoring=d&lr=&hl=en
> Last logon
You need to connect to all domain controllers (unless using the
LastLogonTimestamp described further down).
More here:
http://www.rlmueller.net/Last%20Logon.htm
If your domain functional level has been set to Windows Server 2003,
there is an alternative value you can use (that is replicated, but
will only give you one week intervals on the value):
From the docs:
<quote>
When the domain functional level has been set to Windows Server 2003,
a new lastLogonTimestamp attribute is used to track the last logon
time of a user or computer account.
</quote>
Last-Logon-Timestamp attribute [AD Schema]
http://msdn.microsoft.com/library/en-us/adschema/adschema/a_lastlogontimestamp.asp
<quote>
Last-Logon-Timestamp
This is the time that the user last logged into the domain. This value
is only updated when the user logs in if a week has passed since the
last update. This value is replicated.
</quote>
The above is relevant for both user and computer accounts. Note the
once a week update only part and the Windows Server 2003 domain
functional level prerequisite.
> Profile path for Terminal services
> Terminal services Home folder
If you can run your script from a Windows 2003 Server:
List Terminal Services Properties for a User
http://www.microsoft.com/technet/scriptcenter/scripts/ts/users/tsusvb07.mspx
If a Windows 2003 Server is not an option, a 3rd party free DLL that
can help you here is EOLWTSCOM.dll:
http://groups.google.co.uk/groups?selm=3E4A9464.DD8B201B%40hydro.com
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx
- Next message: RogueIT: "Re: Naming files from an Array"
- Previous message: Roger Abell: "Re: Setting special permission on files and folders from a script"
- In reply to: Randy Reimers: "I want to add fields to user report"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|