Popular Tags

As a reference information, you might want to know about "What tag is popular?" when you write some articles on the TechNet Wiki. How to know what tag is popular, there is a way of seeing the Popular Tags. In the Popular Tag, you can roughly know tags which are often used. (Using much, tag's font size will be larger).

In this case , you can find Active Directory or en-US tag are many. On the other hand, adfs tag is few. However, really few tags are not even listed, so adfs tag also has the moderate number of articles in fact.

PowerShell (script)

In many case, it's enough. However, sometimes you'll want to know the number of articles specifically. The feature to confirm the number of articles which is using specific tag is not exist in the TechNet Wiki, but you can get in the following script.

if (-not $tag) { throw("tag required.") }
$tag = $tag.Replace("-", "_2D00_")
$tag = $tag.Replace(" ", "+")
$tag = $tag.Replace(".", "-")
$url = "http://social.technet.microsoft.com/wiki/contents/articles/tags/" + $tag + "/default.aspx"
$cli = New-Object System.Net.WebClient
$cli.DownloadString($url) -match "<span class=""summary"">Page 1 of [0-9,]+ \(([0-9,]+) items\)" | Out-Null
if ($matches) { $matches[1] } else { "0" }

In the listing page of article which is used specific tag, it doesn't appear the page, but described in the HTML code. Previous script pick up the hiding number in the HTML code.

You can download this script in the TechNet Gallery, please try using.


  • Error handling is not implemented to simplify explanation. please implement as needed after downloading.
  • This script is dependent on current HTML page format in the TechNet Wiki. If HTML page format is changed, this script might not be able to use.

See Also

Other Languages