Previous Next

Thread: Get- cmdlets

Last post 07-22-2008 10:00 AM by danvers72. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-08-2008, 11:46 AM

    • rsiddaw
    • Not Ranked
    • Joined on 07-03-2008, 8:09 PM
    • Posts 7
    • rsiddaw

    Get- cmdlets

    I have been looking at the Get-WebSiteState, Get-AppPoolState, Get-WebItemState cmdlets

    This type of cmdlet in other providers returns a list of the sites or application pools ands their state bydefault.   Get-WebSiteState, Get-AppPoolState just return a simple Started or Stopped.  For general use it be more informative if all sites and their states were returned

    Richard Siddaway
    Powershell MVP
    http://richardsiddaway.spaces.live.com/
  • 07-08-2008, 10:08 PM In reply to

    • sergeia
    • Top 150 Contributor
    • Joined on 04-14-2008, 4:47 PM
    • Posts 19
    • sergeia

    Re: Get- cmdlets

    Do you mean output like from these commands?

    dir iis:\sites | select name,state

    dir iis:\apppools | select name,state

    What is wrong with these command lines? Could you give a scenario when more than state is required? Again, in our design we try to keep number of entities under control. Occam razor principle...

     

    Thanks,

    Sergei

  • 07-10-2008, 6:45 AM In reply to

    • danvers72
    • Not Ranked
    • Joined on 03-29-2007, 6:09 AM
    • Nijmegen
    • Posts 3
    • danvers72

    Re: Get- cmdlets

    I am not sure about Richard, but I personally would have expected output like that from the get-websitestate cmdlet.

    There is nothing wrong with the command lines in your message. It would just been easier and less typing if that output came from get-webitemstate.

    Why not make the Name parameter optional instead of mandatory. If you don't specify a name then you get the states of all websites like "dir iis:\sites | select name,state". And if you specify a name then you get the output as it works now.

    And how about adding the parameters -stopped and -started. When you only want to see all the websites with the status stopped, you would use get-websitestate -stopped. I know it is not necesary because you can always pipe the output to where-object. It is just more easier for us admins.

    Anyway is really love the the new cmdlets that have been added to ctp2. Althoug is still have some remarks. Which I will post at another time when I have had more play time with ctp2. Great job!!

    Kind regards,
    Mario

  • 07-11-2008, 10:42 PM In reply to

    • sergeia
    • Top 150 Contributor
    • Joined on 04-14-2008, 4:47 PM
    • Posts 19
    • sergeia

    Re: Get- cmdlets

    Richard and Mario, thanks for your suggestions! We will consider this for GoLive milestone.

    At the same time, I am certainly surprised by these requests. Not by this specific one, but by the tendency in general. You guys should realise that it is impossible to have trivial commands for all situations. Admins should get familiar with Powershell, at least with main principles, and with IIS namespace. After that you could taylor as many simple commands as required for your business, taste or client. Otherwise you will have to deal with miriad of commands each with multiple parameters, created by Miscrosoft for some abstract administrator. Powershell was created as infinitely extendable platform, which each user or organization will modify as they like. You could easily chain commands into pipeline to get desired result or output. Don't lock yourselves into specific commands!

    For CTP2 I spent two last weeks and added 40 new commands. All those commands could be one-two lines of script, I put it into assembly only to have better service from the shell. If we follow this trend and will try to save key strokes here and there, by the time we ship this project we could easily have ten times more commands -- with depth and complexity of IIS configuration. Do you think it will be better, and easier to use having those 400 commands? Do you think command names will be shorter, more expressive and you will memorize them all? I doubt it...

     

    --Sergei

  • 07-22-2008, 10:00 AM In reply to

    • danvers72
    • Not Ranked
    • Joined on 03-29-2007, 6:09 AM
    • Nijmegen
    • Posts 3
    • danvers72

    Re: Get- cmdlets

    Hello Sergei,

    I am not saying that I want more cmdlets, 400 cmdlets is way too much and not what most people want I think. Cmdlets for just the basic or most used operations should be good enough. For everything else we can make our own functions and scripts by utilizing the IIS provider. The set of cmdlets you produced now is good. It covers the basic needs and a bit more for an IIS Administrator.

    There has been some general debate about provider vs cmdlets in the PowerShell world. Some say people should use the providers because it is more flexible and powerfull while others say the cmdlets are the way to go. It is true that using a provider you can do many advanced things, but there is a higher learning curve. Cmdlets will give users a good and easy starting point. The learning curve is not so high which will result in people using PowerShell faster. Take for example the Quest AD Cmdlets. Although you can do already many AD things with the ADSI provider, the Quest AD Cmdlets have become very popular. Just because they are easy to use.
      
    There are just some tweaks that could be made to make the existing better. It is good to hear that you consider the suggestions. I have some suggestions if you don't mind.

    new-apppool
    This cmdlet could need 3 more optional parameters. For setting the dotnet framework version, the pipeline and identity. For me the identity parameter would be the most important. Like many hosting providers we prefer to give Application Pools alternate credentials. Specially in a shared hosting environment.

    new-website
    For this cmdlet I would propose one extra parameter. This parameter should be used for setting the application pool for the new website. Again this is specially usefull if not critical in a shared hosting environment.

    Thanks for listening.

    Mario

Page 1 of 1 (5 items)
Page view counter