fbpx Program: Search Help for Text in Windows PowerShell | Windows PowerShell, Windows Server | HostingUltraso.com
24/7/365 Support

Program: Search Help for Text in Windows PowerShell

Both the GetCommand and GetHelp cmdlets let you search for command names that match a given pattern. However, when you don’t know exactly what portions of a command name you are looking for, you will more often have success searching through the help content for an answer. On Unix systems, this command is called Apropos. Similar functionality does not exist as part of the PowerShell’s help facilities, however.

That doesn’t need to stop us, though, as we can write the functionality ourselves.

To run this program, supply a search string to the SearchHelp script The script then displays the name and synopsis of all help topics that match. To see the help content for that topic, use the GetHelp cmdlet.

############################################################################## ## ## SearchHelp.ps1 ## ## Search the PowerShell help documentation for a given keyword or regular ## expression. ## ## Example: ## SearchHelp hashtable ## SearchHelp "(datetime|ticks)" ##############################################################################

param($pattern = $(throw "Please specify content to search for"))

$helpNames = $(GetHelp * | WhereObject { $_.Category ne "Alias" })

foreach($helpTopic in $helpNames)

{ $content = GetHelp Full $helpTopic.Name | OutString if($content match $pattern) {

$helpTopic | SelectObject Name,Synopsis } }

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say