There are multiple methods of accessing help documentation in SPE to provide you with information on the commands available to you.
Viewing all available commands
A report is available which will show you all available SPE commands:
Accessing the report
When executed, this report provides a paged view of the SPE commands.
Paged results of commands
Viewing command help
Console
To display the available help for a command in the Console, simply use the Get-Help command:
1
Get-HelpGet-Rendering
Copied!
For full documentation, including examples, use the -Full parameter:
1
Get-HelpGet-Rendering-Full
Copied!
ISE
Through the Integrated Scripting Environment (ISE), SPE provides a method of acccessing help for available commands. To view the help for a command, simply highlight the command and press Ctrl + Enter.
Highlight the command and press Ctrl + Enter
After doing this, a dialog will appear with the relevant help information:
A help dialog for Get-Rendering
Documenting functions
When writing scripts, you are able to include formatted comments that will be used to provide help text for functions. If formatted correctly, this help text will be available through the methods described above.
Example: A simple function with documentation:
1
<#
2
.SYNOPSIS
3
A short synopsis of this function.
4
.DESCRIPTION
5
A much more detailed description of this function, which outputs a value.
6
.PARAMETER Value
7
The value that will be output
8
.EXAMPLE
9
PS> Output-Value "My value"
10
My value
11
#>
12
Function Output-String
13
{
14
param(
15
[string]$value
16
)
17
​
18
Write-Host$value
19
}
Copied!
Once the script containing this function has been invoked, the help text will be available:
Online help is additionaly available for all SPE commands in this documentation, with detailed explanations of commands and their parameters, along with useful examples. These can be found in the Command Appendix.