2

I am using Powershell 5.0.10586.117 with an IIS 7.5.

When running

Get-ItemProperty ($singleAppPool) -Name Recycling.periodicRestart.schedule.collection 

I receive i.e.

DefaultAppPool value : 03:00:00 Attributes : {Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute} ChildElements : {} ElementTagName : add Methods : Schema : Microsoft.IIs.PowerShell.Framework.ConfigurationElementSchema 

However I only want to get the value. But

Get-ItemProperty ($singleAppPool) -Name Recycling.periodicRestart.schedule.collection 

fails with a "not found" error message.

How to be able to get value only here?

For the sake of being able to reproduce use

Import-Module WebAdministration 

in the beginning.

1 Answer 1

2

If the command works per your example, you can get the value property like this:

(Get-ItemProperty ($singleAppPool) -Name Recycling.periodicRestart.schedule.collection).Value 

I can't diagnose why you get a "not found" error message without you sharing the error or without knowing what is in $singleAppPool or if that is a valid item on your server.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.