Clear-Host

$VisualStudioVersion = "14.0"
$GalleryUrl = "http://localhost/InmetaGallery/GalleryService.svc"
$PrivateGalleryName = "Inmeta Visual Studio Gallery"

$VisualStudioExtensionKey = "HKCU:\Software\Microsoft\VisualStudio\$VisualStudioVersion\ExtensionManager\Repositories"

#Get the Guid of the newly added Private Extension Gallery
$PrivateGalleryKey = Get-ChildItem -Path $VisualStudioExtensionKey

#Write-Host $PrivateGalleryKey

#Set the Protocol for the Private Extension Gallery
New-ItemProperty -Path Registry::$PrivateGalleryKey -Name "Protocol" -Value "VSGallery" -Force