Cannot get Select Command to work in Powershell

I want to list the names of all web applications in IIS using the command Get-WebApplication.

Get-WebApplication -site "Default Web Site"

It works and returns something like this

Name             Application pool   Protocols    Physical Path
----             ----------------   ---------    -------------
test.com         test.comAppPo      http         E:\Sites\test.com

I just want to see the name of the application, so I used -

Get-WebApplication -site "Default Web Site" | Select Name

Results are not returned. What am I doing wrong?

+4
source share
1 answer

Try the following:

Get-WebApplication -Site "Default Web Site" | Select applicationPool

By the way, you can use PowerShell to find the members of the first teams by connecting it to | Get-Member is like this.

Get-WebApplication | Get-Member

This gives you a list of the properties and methods of this first command.

(cmdlets) | get a member

. , , 'applicationPool' .

+3

All Articles