Skip to content

Instantly share code, notes, and snippets.

@pmolchanov
Created July 18, 2016 21:06
Show Gist options
  • Save pmolchanov/88e4a5b84c0aac03e7f6815bca3b85c8 to your computer and use it in GitHub Desktop.
Save pmolchanov/88e4a5b84c0aac03e7f6815bca3b85c8 to your computer and use it in GitHub Desktop.
Lists all IIS websites in URL form
Import-Module Webadministration
Get-ChildItem -Path IIS:\Sites | Where-Object { $_.State -eq 'Started' } | ForEach-Object { $_.Bindings.Collection } | ForEach-Object { $_.Protocol + '://' + $_.BindingInformation.Split(":")[2] } | Sort-Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment