Skip to content

Instantly share code, notes, and snippets.

@TomCan
Last active June 11, 2021 10:46
Show Gist options
  • Save TomCan/db8ea9276395d316269f63ac4684398e to your computer and use it in GitHub Desktop.
Save TomCan/db8ea9276395d316269f63ac4684398e to your computer and use it in GitHub Desktop.
Powershell: list IIS websites with state and bindings
Foreach ($Site in get-website) {
Foreach ($Bind in $Site.bindings.collection) {
Write-Host $Site.name ":" $Site.state ":" $Bind.Protocol ":" $Bind.BindingInformation
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment