Last active
August 10, 2018 19:30
-
-
Save timgaunt/011d8d39a48299e2b1383f60d1586d15 to your computer and use it in GitHub Desktop.
List the IIS sites using PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WebBinding | % { | |
$name = $_.ItemXPath -replace '(?:.*?)name=''([^'']*)(?:.*)', '$1' | |
New-Object psobject -Property @{ | |
Name = $name | |
Binding = $_.bindinginformation.Split(":")[-1] | |
} | |
} | Group-Object -Property Name | | |
Format-Table Name, @{n="Bindings";e={$_.Group.Binding -join "`n"}} -Wrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Path IIS:\Sites | findstr “https” |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WebBinding | % {$name = $_.ItemXPath -replace '(?:.*?)name=''([^'']*)(?:.*)', '$1';New-Object psobject -Property @{Name = $name;Binding = $_.bindinginformation.Split(":")[-1];}} | Group-Object -Property Name | Format-Table Name, @{n="Bindings";e={$_.Group.Binding -join "`n"}} -Wrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment