Setup: Computer with PowerShell installed, IIS enabled
Problem: You want a list will all websites and their details.
Solution:
get-website | select name,id,state,physicalpath,
@{n="Bindings"; e= { ($_.bindings | select -expa collection) -join ‘;’ }} ,
@{n="LogFile";e={ $_.logfile | select -expa directory}},
@{n="attributes"; e={($_.attributes | % { $_.name + "=" + $_.value }) -join ‘;’ }}
I want to get the list of websites for multiple IIS servers