adric: (Hacker)
adric ([personal profile] adric) wrote2007-10-05 04:58 pm

Success?! (Yes, more Windows Scripting crap)


PS C:\Users\Administrator> Get-WmiObject -namespace "root/WebAdministration" -query "select * from VirtualDirectory" | Select-Object SiteName,PhysicalPath

SiteName PhysicalPath
-------- ------------
Default Web Site %SystemDrive%\inetpub\wwwroot
Default Web Site C:\Perl\eg\PerlEx
longhorn C:\inetpub\wwwroot



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
parentingtheriot: (Default)

[personal profile] parentingtheriot 2007-10-06 02:33 am (UTC)(link)
it's you! your html is thwacking my friendspage! stop that!