Friday, May 2, 2014

Get website details such as physical path using Powershell



Import-Module "WebAdministration" -ErrorAction Stop

foreach($site in (dir iis:\sites\*WebSiteNameXyz*))



{

write-host $site.Name

write-host $site.Bindings

write-host $site.State

write-host $site.physicalpath



}

No comments :