Propriedade não selecionável (?) no módulo Powershell do IIS

1
dir iis:\apppools

Dá 3 propriedades: Nome, Estado e Aplicações.

Gostaria de isolar "Aplicativos", mas, por algum motivo, ele não é encontrado na lista Get-Member.

   TypeName: Microsoft.IIs.PowerShell.Framework.ConfigurationElement#system.applicationHost/applicationPools#add

Name                        MemberType            Definition                                                           
----                        ----------            ----------                                                           
Recycle                     CodeMethod            void Recycle()                                                       
Start                       CodeMethod            void Start()                                                         
Stop                        CodeMethod            void Stop()                                                          
applicationPoolSid          CodeProperty          Microsoft.IIs.PowerShell.Framework.CodeProperty                      
state                       CodeProperty          Microsoft.IIs.PowerShell.Framework.CodeProperty                      
ClearLocalData              Method                void ClearLocalData()                                                
Copy                        Method                void Copy(Microsoft.IIs.PowerShell.Framework.ConfigurationElement ...
Delete                      Method                void Delete()                                                        
Equals                      Method                bool Equals(System.Object obj), bool IEquatable[ConfigurationEleme...
GetAttribute                Method                Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute GetAttri...
GetAttributeValue           Method                System.Object GetAttributeValue(string attributeName)                
GetChildElement             Method                Microsoft.IIs.PowerShell.Framework.ConfigurationElement GetChildEl...
GetCollection               Method                Microsoft.IIs.PowerShell.Framework.ConfigurationElementCollection ...
GetHashCode                 Method                int GetHashCode()                                                    
GetMetadata                 Method                System.Object GetMetadata(string metadataType)                       
GetParentElement            Method                Microsoft.IIs.PowerShell.Framework.ConfigurationElement GetParentE...
GetType                     Method                type GetType()                                                       
LoadProperties              Method                void LoadProperties(System.Collections.Generic.Dictionary[string,S...
SetAttributeValue           Method                void SetAttributeValue(string attributeName, System.Object value)    
SetMetadata                 Method                void SetMetadata(string metadataType, System.Object value)           
ToPSObject                  Method                psobject ToPSObject(Microsoft.IIs.PowerShell.Framework.Configurati...
ToString                    Method                string ToString()                                                    
Update                      Method                void Update(Microsoft.IIs.PowerShell.Framework.ConfigurationElemen...
UpdateCollection            Method                bool UpdateCollection(psobject[] arr)                                
autoStart                   NoteProperty          System.Boolean autoStart=True                                        
CLRConfigFile               NoteProperty          System.String CLRConfigFile=                                         
cpu                         NoteProperty          Microsoft.IIs.PowerShell.Framework.ConfigurationElement#add#cpu cp...
enable32BitAppOnWin64       NoteProperty          System.Boolean enable32BitAppOnWin64=False                           
enableConfigurationOverride NoteProperty          System.Boolean enableConfigurationOverride=True                      
failure                     NoteProperty          Microsoft.IIs.PowerShell.Framework.ConfigurationElement#add#failur...
ItemXPath                   NoteProperty          System.String ItemXPath=/system.applicationHost/applicationPools/a...
managedPipelineMode         NoteProperty          System.String managedPipelineMode=Classic                            
managedRuntimeLoader        NoteProperty          System.String managedRuntimeLoader=webengine4.dll                    
managedRuntimeVersion       NoteProperty          System.String managedRuntimeVersion=v4.0                             
name                        NoteProperty          System.String name=ASP.NET v4.0                                      
passAnonymousToken          NoteProperty          System.Boolean passAnonymousToken=True                               
processModel                NoteProperty          Microsoft.IIs.PowerShell.Framework.ConfigurationElement#add#proces...
PSChildName                 NoteProperty          System.String PSChildName=ASP.NET v4.0                               
PSDrive                     NoteProperty          System.Management.Automation.PSDriveInfo PSDrive=IIS                 
PSIsContainer               NoteProperty          System.Boolean PSIsContainer=True                                    
PSParentPath                NoteProperty          System.String PSParentPath=WebAdministration::\MED1-WEB\AppPools    
PSPath                      NoteProperty          System.String PSPath=WebAdministration::\MED1-WEB\AppPools\ASP.NE...
PSProvider                  NoteProperty          Microsoft.IIs.PowerShell.Provider.IIsProviderInfo PSProvider=WebAd...
queueLength                 NoteProperty          System.Int64 queueLength=1000                                        
recycling                   NoteProperty          Microsoft.IIs.PowerShell.Framework.ConfigurationElement#add#recycl...
startMode                   NoteProperty          System.String startMode=OnDemand                                     
workerProcesses             NoteProperty          Microsoft.IIs.PowerShell.Framework.ConfigurationElement#add#worker...
Item                        ParameterizedProperty System.Object Item(string attributeName) {get;set;}                  
Attributes                  Property              Microsoft.IIs.PowerShell.Framework.ConfigurationAttributeCollectio...
ChildElements               Property              Microsoft.IIs.PowerShell.Framework.ConfigurationChildElementCollec...
ElementTagName              Property              string ElementTagName {get;}                                         
Methods                     Property              Microsoft.IIs.PowerShell.Framework.ConfigurationMethodCollection M...
Schema                      Property              Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema Sche...

O que estou perdendo?

    
por JustAGuy 06.10.2014 / 08:38

1 resposta

0

Salve o seguinte em um arquivo Get-AppsInAppPool.ps1 e chame assim:

Get-AppsInAppPool -appPool "My Pool Name"

param([string]$appPool)    

import-module webadministration

 $apps = (Get-WebConfigurationProperty "/system.applicationHost/sites/site/application['
 @applicationPool='$appPool']" "machine/webroot/apphost" -name path).ItemXPath 

foreach ($s in $apps) {
    $name = $s -replace "\/system.applicationHost\/sites\/site\[\@name='", ""
    $name = $name -replace "' and \@id='\d{1,10}'\]\/application\[\@path='", ""
    $name = $name -replace "'\]",""
    $out += $name + "'n"
}

$out
    
por 12.02.2015 / 16:32