I have got the power!!

Hehe :)  Not just me! You have got the power as well.... to manage IIS via PowerShell. Honestly, I'm not a big fan of coding, gave that out many years ago - coz my logical thinking cell somehow resides at right brain. For now, I preferred ready made tools to help me. Prior to version 6, I can't live without adsutil.vbs, with 6.0 - I love all the built-in vbs scripts as well. E.g. iisapp.vbs, iiscnfg.vbs, etc. For IIS 7.0, it will be the appcmd.exe - the new command line tool.

With the recent released of PowerShell, you have got more POWER to manage IIS. I'm happy with the appcmd.exe. If you power hunger - first read the intro here, then if you familiar with WMI, try your own cmd-lets via WMI provider, and the latest show cases - Tobin demostrates another powerful force with Microsoft.Web.Administration component dll. From loading it into the shell to extending its power. Zzzz.. at this point I'm actually abit lost with it :)  d*mn complicated! LOL! maybe it just me.

Published Sat, Dec 2 2006 13:14 by qbernard
Filed under: ,

Comments

# Tobin said on 02 February, 2007 11:55 PM

So, tell me what's complicated and I'll do my best to help you. Is it Powershell itself, or is it my explanation of how to use it?  Are you coming at this from a developer perspective or an administrator perspective?  

To keep it simple, what are your paint points with using Powershell and IIS 7?

# qbernard said on 03 February, 2007 01:14 AM

Thanks Tobin, actually is the powershell syntax itself, looks like perl language to me :) How does PS complement appcmd.exe?

# Tobin said on 04 February, 2007 02:42 PM

IMHO, PS could replace appcmd. Putting that notion aside, consider that you can pipe your output to anything else.  That output could be a visual gadget, more text output, a file, or a network connection of some sort. You can filter your output how you want.  The list goes on.  Just like unix shells, the power isn't in typing out long syntax every time you want to do something.  It is in your ability to write shell scripts that you can execute with your own syntax.

For instance, instead of typing:

(New-Object Microsoft.Web.Administration.ServerManager).Sites["Default Web Site"]

I can create a simple script function:

function findSite()

{

 return (New-Object Microsoft.Web.Administration.ServerManager).Sites[$args[0]]

}

and then from that point on, I simply need to type: findSite("Default Web Site")

I can still pipe that output to anything I want.  I can also still format the output however I want.

I suppose as a developer, I find this more appealing that a restrictive command line tool that has a strict syntax.

# qbernard said on 04 February, 2007 11:07 PM

Cool! so in a way PS provides you more flexibility to manipulate data on top of a query and sort of like 'extending' your management power :)

# Tobin said on 05 February, 2007 04:50 AM

Exactly!  And, as my second blog post on the subject demonstrates, you can extend existing managed code with PowerShell.

# qbernard said on 07 February, 2007 05:26 AM

Lovely, I know internally the folks here are using PS with WMI for some general management. For me, I think it's time to learn more about the syntax :)

News

Search

Go

This Blog

Tags

Archives

IIS Sites

MVPs - MVPs

IIS Related

Syndication