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 ‘;’ }}
Tagged:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *