Quick-Hits: List 25 newest scripts in Microsoft Script Repository

This is a just a quick script to query the rss feed of the Microsoft Script Repository for the newest 25 scripts that have been uploaded.  Just 4 lines of code to get this accomplished, which is yet another reason why PowerShell is just so awesome. Smile I am once again using the System.Net.WebClient class to make the web site call and download the source code while also using the [XML] accelerator to read the xml data that I downloaded. For more information about what I did with the System.Net.WebClient class, see this post.

Example from March 4,2011

Get-ScriptRepositoryNewest

Capture

 

Function Get-ScriptRepositoryNewest {
<#   
.SYNOPSIS   
    Retrieves the 25 newest scripts from the Microsoft Script Repository 
.DESCRIPTION 
    Retrieves the 25 newest scripts from the Microsoft Script Repository
.NOTES   
    Name: Get-ScriptRepositoryNewest 
    Author: Boe Prox 
    DateCreated: 04Mar2011         
.EXAMPLE   
Get-ScriptRepositoryNewest
 
Description 
----------- 
Retrieves the 25 newest scripts from the Microsoft Script Repository 
#>  
$url = "http://gallery.technet.microsoft.com/scriptcenter/site/feeds/searchRss?sortBy=date"
$web = New-Object System.Net.WebClient
$rss = [xml]$web.downloadString($url)
$rss.rss.channel.item | Select Title, Author, Link, Description
}

About Boe Prox

Microsoft Cloud and Datacenter MVP working as a SQL DBA.
This entry was posted in powershell, scripts and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s