#PSTip Get PowerShell Magazine’s daily tips right from your console!

Our editors at the PowerShell Magazine are doing a great job pushing daily PowerShell tips and tricks to our readers. Now, wouldn’t it be great if you can get access to these tips right from your console?

Yes, it is easy. In fact, PowerShell 3.0 makes it way too easy. Check this:

Function Get-PSTip {
	param (
		[switch]$Multiple
	)

	$url = Invoke-RestMethod -Uri "http://bit.ly/QwjgRd"

	if ($Multiple) {
		$selectedTips = $url | Select-Object Title, Link | Out-GridView -PassThru
		if ($selectedTips) {
			$selectedTips | Foreach-Object {
				Start-Process $_.Link
			}
		}
	} else {
		Start-Process $url[0].Link
	}
}

This is it. Add this simple code snippet to your PowerShell profile and then every time you run, Get-PSTip, you will have the latest tip served right from your console or PowerShell ISE prompt. Also, you can use Get-PSTip with -Multiple parameter to select a tip from the list and open that in browser.

About the author: Ravikanth C

Ravikanth is the founder and editor of the PowerShell Magazine. He is also a PowerShell MVP who works at Dell Inc. He blogs at http://www.ravichaganti.com/blog and you can follow him on Twitter @ravikanth.

Related Posts

%d bloggers like this: