I'm trying to list IIS application pool "names" that are actually tied to an IIS web application. Basically exclude app pool that has a null value in the 3rd column titled "Applications". So if i run commands below i get following output
Import-module webadministration
Get-childitem IIS:\\apppools
I get :-
Name State Applications
asdf started
zcxv started zcxvWebapp
qwer started qwerWebapp
uiop started
--------------------------------------------
I'd like to have an output that only displays 'zcxv' and 'qwer' application pools since, they are the only 2 app pools that have an application present in the 3rd column titled "Applications".
I tried the following two commands, but when i execute them, the output is blank, no output at all. Like as if I hit the ENTER key
Get-ChildItem IIS:\apppools | ? {$_.Applications -ne $null}
(gci IIS:\apppools | ? {$_.Applications -ne $null }).Name
Is there a workaround for this? Thanks much folks