adric: (Hacker)
2007-10-05 04:58 pm

Success?! (Yes, more Windows Scripting crap)

windows console spam )

Or, with the DotNet assemblies (libraries) loaded in ...
PS C:\scripts> $sm = ( New-Object Microsoft.Web.Administration.ServerManager )
PS C:\scripts> $sm.Sites | Select Id, Name

 Id Name
 -- ----
  1 Default Web Site
  2 longhorn

ala: http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx
adric: (Hacker)
2007-10-04 09:49 pm
Entry tags:

WMI, IIS, CIM and other cursewords

Finally, after hours of reading through mind-numbingly overcomplicated documentation about the incredible plural architectures for Windows system management (not that I wanted to know any of that, mind you) and their various benighted APIs and tools ...

I present, the answer, or at least the kernel of one:
arcane invocations within )
ref: http://msdn2.microsoft.com/en-us/library/ms524913.aspx