简体   繁体   中英

How to get the first element in the collection with appcmd.exe?

I need to get recycling time for the app pool. I can't use the powershell, so I use appcmd.exe for this. I found that there is a command for this:

%windir%\System32\inetsrv\appcmd.exe  LIST APPPOOL test /text:recycling.periodicRestart.schedule.[value='08:23:00'].value

But the problem that I need to specify the time to receive that time: 在此处输入图片说明

So now it works as a check if recycling has been scheduled for that specific time. I suppose appcmd works with this data as a collection. Is there any way to get the first item?

Below command will show you the IIS application pool config setting:

APPCMD LIST APPPOOL "sample1" /config

or

%systemroot%\system32\inetsrv\APPCMD list apppool "sample1" /text:*

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM