Powershell - Grupo de aplicaciones - Configuración avanzada - Intervalo de tiempo regular

I am trying to use PowerShell to query The advanced settings of Applicaiton pools in IIS7.5.

Via the GUI - Highlight the Application pool, click on Advanced Settings in the Action Pane.

I have tried to make use of the "webAdministration" module in powershell, but I either cannot find the correct function or syntax to use.

I can find the application pools under IIS:\AppPools* but I am not able to query each for its configuration / property settings / etc.

I am struggling to find any information on how to even query this information, any help is much appreciated.

preguntado el 30 de enero de 12 a las 19:01

1 Respuestas

Is this what you need (can't test it now, sorry)?

 $Pool = New-Item IIS:\AppPools\MyAppPool
 $Pool.recycling.periodicRestart.time = [TimeSpan] "00:10:00" # this to set
 $Pool.recycling.periodicRestart.time # this to get

Respondido el 31 de enero de 12 a las 00:01

Christian, Thank you. This is what I needed, I had failed to put the periodicRestart.time as associated with Regular Time interval. Much appreciated! I really have to find a mapping GUI fields to attributes or something like that. Thanks again. - colo_joe

You can discover these settings by backing up your applicationHost.config/web.config files (depending on if server or app level change), make change thru UI, then compare the old and new files. In this case, you should have something like: <applicationPools><add name="AppPoolName">...<recycling><periodicRestart time="00:10:00" /></recycling>... This should give you a direction for how to explore the PS object... $pool | get-member - Daniel Richnak

rkinik, I have followed your advice and have learned alot. Thank you, piping to get-member has been a eye opener for me. - colo_joe

¿No debería ser eso? $pool = Get-Item IIS:\AppPools\MyAppPool? - rbellamy

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.