This blog has moved to http://ThePowerShellGuy.com
and again Beta 3 mentioned in the NG
You should get a new drop shortly (maybe as early as today but it
more than a week) that has the MSHSNAPIN support model
Jeffrey Snover [MSFT]
Windows Command Shell
This posting is provided "AS IS" with no
warranties, and confers no rights.
I was busy redoing this column, from the Scripting guys (again)How can I determine the last time a user logged on to Active Directory?
I was doing realy well, till I came to the LargeInt Property.
but I have some hopes Beta 3 will solve this ( $de.get_Properties().lastLogon will give a large Int Com object back Monad can not handle)
But I did most of the code of the aticle in 2 line till then
Figure 2 Retrieve Time Zone Offsets from 7 lines in the original to 1 line in MSH (search for timezone in the Blogger search on top or the google search on the bottom of the blog to see how)
the next 9 lines in the article, getting all the Domaincontrollers to 1 line in MSH (AD Infastructure exploring with MSH
as a hint)
and then get lastlogon on the same line (as I could use the LargeInt)
then I needed 1 line for the DN string variable to keep it readable.
if it works in Beta 3, or I get an aswer on the newsgroup (microsoft.public.windows.server.scripting) I will post the compleet script. (with a searcher for looking up the user I think)
PS Keith Hill ( Keith Hill's Blog
) who got a MVP award yesterday also!,
mentioned a way on the NG involving running tlbimp on the COM DLL to generate an interop assembly and load that into Monad.But that was not realy wat I wanted to show here ;-)
PS 2 there are some other nice discussions going on on the newsgroup amongst them an input request about the MSH standard verbs from Jeffrey Snover, a change to influence the language ! (or what others can do with it ;-).
PS 3 if you upgrade MSH from 50215 build of Beta 2 (see last post) or as a new install I also re-recommend this post from Lee Holmes http://www.proudlyserving.com/about_signing.htmTags : Monad msh