PoshCode Archive  Artifact [72347d10c6]

Artifact 72347d10c6e7daaec587ed7b128aadfe1f4119ba273beba638d8f22038386f30:

  • File Search-PoshcodeScript.ps1 — part of check-in [8fa8be780d] at 2018-06-10 13:55:07 on branch trunk — I found this script very useful. Enjoy!:) (user: greg zakharov size: 752)

# encoding: ascii
# api: powershell
# title: Search-PoshcodeScript
# description: I found this script very useful. Enjoy!:)
# version: 0.1
# type: function
# author: greg zakharov
# license: CC0
# function: Search-PoshcodeScript
# x-poshcode-id: 5419
# x-archived: 2015-01-31T20:28:29
# x-published: 2015-09-12T05:35:00
#
#
function Search-PoshcodeScript {
  <#
    .EXAMPLE
        PS C:\> Search-PoshcodeScript "logon users"
    .NOTES
        Author: greg zakharov
  #>
  param(
    [Parameter(Mandatory=$true)]
    [String]$ScriptName
  )
  
  &(([Regex]"(?<=`")(.*)(?=`"\s)").Match(
    (cmd /c ftype (cmd /c assoc .html).Split('=')[1])
  ).Value) ('http://poshcode.org/?lang=&q=' + $ScriptName -replace '\s', '+')
}