Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Powershell to Get bindins info from AppPools

$
0
0

Hi,

I'm new to IIS so please excuse if my terminology is not accurate.... Well I'm trying to get the bindings information for AppPools under Sites.

If I execute this 1st command below (Get-ChildItem .....) I get the output on yellow below,  which is good because I see the Site and the bindind port BUT still missing info.

Now if i execute the 2nd command I get indeed all the Apps but I can't tell what Sites it belong to, and no bindind info is displayed.

 What I want is the Site and all Applications under it Grouped and have the binding port number displayed as well (please see at the very botton the desired output)

I supposed to script it and get the info from another servers within my LAN, but I'm hoping to pull the info in the way I need it. I started to test with the "Invoked-Command" but I have no background with extracting info with powershell

Is there anyone able to advise how to accomplish this?, thanks in advanced.

Get-ChildItem -path IIS:\Sites;
Get-ChildItem -path IIS:\AppPools
Invoke-Command { Import-Module WebAdministration; Get-ChildItem -path IIS:\Sites; Get-ChildItem -path IIS:\AppPools | Format-Table}



Name             ID   State      Physical Path                  Bindings
---- -- ----- ------------- --------
BLA_conf 5 Started d:\fakepath\BLA_conf\WEB http *:86:
Name                         State         Applications
----                         -----         ------------
BLA.fakeapp.One.WebApi       Started       /BLA.fakeapp.One.WebApi
BLA.fakeapp.Two.API          Started       /BLA.fakeapp.One.WebApi
BLA.fakeapp.Three.Stuff.API  Started       /BLA.fakeapp.Three.Stuff.API

DESIRED OUTPUT

Name             ID   State      Physical Path                  Bindings
----             --   -----      -------------                  --------
BLA_conf         5    Started    d:\fakepath\BLA_conf\WEB            http *:86:
- App1..
- App2..
- App3..

BLI_conf         5    Started    d:\fakepath\BLI_conf\WEB            http *:8080:
- App1..
- App2..
- App3..

BLU_conf         5    Started    d:\fakepath\BLU_conf\WEB            http *:81:
- App1..
- App2..
- App3..




Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>