Created
December 30, 2016 13:45
-
-
Save KaiWalter/cf1bdc8db50fb0cc657894446bdf128b to your computer and use it in GitHub Desktop.
PowerShell small menu script for links
This file contains hidden or 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
| $links = ( | |
| "https://aka.ms/apimdocs", | |
| "https://aka.ms/apimroadmap", | |
| "https://aka.ms/apimpolicies", | |
| "https://aka.ms/apimwish", | |
| "https://functions-next.azure.com", | |
| "https://github.com/Azure/Azure-Functions", | |
| "https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/", | |
| "https://azure.microsoft.com/en-us/documentation/articles/guidance-naming-conventions/", | |
| "https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration", | |
| "https://www.visualstudio.com/en-us/docs/build/admin/agents/hosted-pool#software-on-the-hosted-build-server", | |
| "https://blogs.msdn.microsoft.com/webdev/", | |
| "https://weblogs.asp.net/scottgu", | |
| "http://www.hanselman.com/blog/", | |
| "http://madskristensen.net/", | |
| "http://www.bradygaster.com/" | |
| ) | Sort-Object | |
| $lastIndex = -1 | |
| foreach($link in $links) | |
| { | |
| $lastIndex++ | |
| Write-Host $lastIndex ")" $link | |
| } | |
| do { | |
| try { | |
| $numOk = $true | |
| [int]$selectedIndex = Read-host "Please make a selection" | |
| } # end try | |
| catch {$numOK = $false} | |
| } # end do | |
| until (($selectedIndex -ge 0 -and $selectedIndex -le $lastIndex) -and $numOK) | |
| Write-Host $links[$selectedIndex] | |
| $startLink = $links[$selectedIndex] | |
| Start-Process $startLink |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment