none
Display values of Microsoft.IIs.PowerShell.Framework.ConfigurationElement in Powershell RRS feed

  • Question

  • Hi all

    As part of my struggle to write a comprehensive script to deploy web applications to the servers of the company that I work for, I have coded a part of the script which displays the properties of the necessary application pools.  This is shown below:

    Get-Item -Path $POOLPATH | Format-List *

    And it returns information in this form:

    name                        : DefaultAppPool
    queueLength                 : 1000
    autoStart                   : True
    enable32BitAppOnWin64       : False
    managedRuntimeVersion       : v4.0
    managedRuntimeLoader        : webengine4.dll
    enableConfigurationOverride : True
    managedPipelineMode         : Integrated
    CLRConfigFile               : 
    passAnonymousToken          : True
    startMode                   : OnDemand
    state                       : Started
    applicationPoolSid          : S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415
    processModel                : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
    recycling                   : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
    failure                     : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
    cpu                         : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
    workerProcesses             : Microsoft.IIs.PowerShell.Framework.ConfigurationElement
    ItemXPath                   : /system.applicationHost/applicationPools/add[@name='DefaultAppPool']
    PSPath                      : WebAdministration::\\ITPCWXG4\AppPools\DefaultAppPool
    PSParentPath                : WebAdministration::\\ITPCWXG4\AppPools
    PSChildName                 : DefaultAppPool
    PSDrive                     : IIS
    PSProvider                  : WebAdministration
    PSIsContainer               : True
    Attributes                  : {name, queueLength, autoStart, enable32BitAppOnWin64...}
    ChildElements               : {processModel, recycling, failure, cpu...}
    ElementTagName              : add
    Methods                     : {Start, Stop, Recycle}
    Schema                      : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema
    My question is, how do I get the information for the properties displaying "Microsoft.IIs.PowerShell.Framework.ConfigurationElement" to show?
    Monday, July 21, 2014 11:12 AM

Answers

  • Some thing like this?

    Get-ItemProperty -Path IIS:\AppPools\Test1 -Name ProcessModel
    Get-ItemProperty -Path IIS:\AppPools\* -Name ProcessModel



    Regards Chen V [MCTS SharePoint 2010]


    Monday, July 21, 2014 1:24 PM

All replies

  • I don't think Get-Item will show that information. Do you have Web Adminisration module installed?

    Then you can try the below

    get-website -name "Default Web Site" | select -ExpandProperty ProcessModel | Select -ExpandProperty Collection

    get-website -name "Default Web Site" | select -ExpandProperty Recycling | Select -ExpandProperty Collection


    Regards Chen V [MCTS SharePoint 2010]

    Monday, July 21, 2014 11:40 AM
  • I have that module. Will that work with the Get-WebAppPool cmdlet instead? 

    Also, do you know if it's possible to make something more general?  I would rather not write that line out for each property I need to display - my script is long enough already!

    Monday, July 21, 2014 11:49 AM
  • mmm, I am sure no commands like get-WebAppPool or I may be wrong. I have seen Web App pool state.

    What are you trying to achieve? App pool Configuration? or IIS configuration ?


    Regards Chen V [MCTS SharePoint 2010]

    Monday, July 21, 2014 12:32 PM
  • App pool config is the aim.  I have a later code block which is working to let the user change app pool properties
    Monday, July 21, 2014 1:18 PM
  • Some thing like this?

    Get-ItemProperty -Path IIS:\AppPools\Test1 -Name ProcessModel
    Get-ItemProperty -Path IIS:\AppPools\* -Name ProcessModel



    Regards Chen V [MCTS SharePoint 2010]


    Monday, July 21, 2014 1:24 PM
  • That seems to work, thanks very much
    Monday, July 21, 2014 1:31 PM
  • Glad that it worked. I am wondering why not DSC? if you are in PS 4.0 you can use Desired State Configuration and achieve this.

    Regards Chen V [MCTS SharePoint 2010]

    Monday, July 21, 2014 1:37 PM
  • Only on PowerShell 3.0 unfortunately
    Monday, July 21, 2014 3:48 PM
  • Mmmm, that's alright atleast you can stick over to this

    Regards Chen V [MCTS SharePoint 2010]

    Monday, July 21, 2014 4:38 PM