1

I'm trying to get identity type from application pools in IIS in .bat file. This give me a list of pool names:

cd %windir%\system32\inetsrv
appcmd list apppool /text:name

For example, I have pool named "DefaultAppPool" and I get it identity type with command line

appcmd.exe list apppool "DefaultAppPool" /text:processModel.identityType

Now, i want to do that automaticlly and the problem is I don't now how to set command line to some variable. I tried this:

SET appPoolList = appcmd list apppool /text:name

but it does't work. This is all my example below:

cd %windir%\system32\inetsrv
appcmd list apppool /text:name
@echo off
SET appPoolList = appcmd list apppool /text:name

for %%x in (      
      %appPoolList%
       ) do (
        appcmd.exe list apppool "x" /text:processModel.identityType
       )
pause
Dado
  • 1,016
  • 1
  • 12
  • 20

0 Answers0