I wanted to get a list of all webs within a web application. By accident I wrote the following:
$webapp = "http://mywebapp"
$webapp | Get-SPSite | Get-SPWeb
So, this returned fantastic results, giving me the URLs of each web in the web app. But the powershell command doesn't make sense to me.
I actually meant to write something like:
$webapp = "http://mywebapp"
Get-SPWebApplication $webapp | Get-SPSite | Get-SPWeb
which produces the same results. Does it just take the url at face value and intelligently assume it's a web app url? I'm guessing it converts it to an SPWebApplication object, and pipes that to Get-SPSite, which gets each site collection object within the web app, etc..