Skip to content

Instantly share code, notes, and snippets.

@MartinMiles
Created November 5, 2019 04:24
Show Gist options
  • Save MartinMiles/f9b353a5e75b9ba3de0b9012dcaa040c to your computer and use it in GitHub Desktop.
Save MartinMiles/f9b353a5e75b9ba3de0b9012dcaa040c to your computer and use it in GitHub Desktop.
Sitecore Instances List
Get-WebSite | ForEach-Object {
$binPath = Join-Path -Path $_.PhysicalPath -ChildPath "bin\Sitecore.Kernel.dll"
$item = Get-Item -Path $binPath -ErrorAction SilentlyContinue
if( $item -ne $null )
{
"Sitecore Site: Name:$($_.Name), Version: $($item.VersionInfo.FileVersion), Path $($_.PhysicalPath)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment