|
1 | 1 | --- |
2 | | -description: Learn how to get help on your psake tasks |
| 2 | +description: Learn how to get help with psake - built-in documentation and community support |
3 | 3 | sidebar_position: 3 |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Getting Help |
7 | 7 |
|
8 | | -You can also use the PowerShell command `Get-Help` on the `Invoke-psake` |
9 | | -function to get more detailed help. |
| 8 | +## Built-in Help |
10 | 9 |
|
11 | | -```powershell |
12 | | -# First import the psake.psm1 file |
| 10 | +### View Available Tasks |
13 | 11 |
|
14 | | -Import-Module .\psake.psm1 |
| 12 | +To see a list of all tasks defined in your psake build script, use the `-Docs` parameter: |
15 | 13 |
|
16 | | -Get-Help Invoke-psake -full |
| 14 | +```powershell |
| 15 | +Invoke-psake -Docs |
17 | 16 | ``` |
18 | 17 |
|
19 | | -To list functions available in the psake module: |
| 18 | +This will print the current tasks list from your psake file, showing all available tasks and their descriptions. |
| 19 | + |
| 20 | +### PowerShell Help System |
| 21 | + |
| 22 | +You can use the PowerShell `Get-Help` command on the `Invoke-psake` function to get detailed help: |
20 | 23 |
|
21 | 24 | ```powershell |
22 | | -C:\Software\psake> Get-Command -module psake |
23 | | -
|
24 | | -CommandType Name Definition |
25 | | ------------ ---- ---------- |
26 | | -Function Assert ... |
27 | | -Function Exec ... |
28 | | -Function FormatTaskName ... |
29 | | -Function Include ... |
30 | | -Function Invoke-psake ... |
31 | | -Function Properties ... |
32 | | -Function Task ... |
33 | | -Function TaskSetup ... |
34 | | -Function TaskTearDown ... |
| 25 | +# First import the psake module |
| 26 | +Import-Module psake |
| 27 | +
|
| 28 | +# View full help for Invoke-psake |
| 29 | +Get-Help Invoke-psake -Full |
35 | 30 | ``` |
36 | 31 |
|
37 | | -To get example usage for individual functions in the psake PowerShell module, |
38 | | -use Get-Help, For example: |
| 32 | +### List Available Commands |
| 33 | + |
| 34 | +To see all functions available in the psake module: |
39 | 35 |
|
40 | 36 | ```powershell |
41 | | -C:\Software\psake> Get-Help Assert -examples |
| 37 | +Get-Command -Module psake |
| 38 | +
|
| 39 | +# Output: |
| 40 | +# CommandType Name Definition |
| 41 | +# ----------- ---- ---------- |
| 42 | +# Function Assert ... |
| 43 | +# Function Exec ... |
| 44 | +# Function FormatTaskName ... |
| 45 | +# Function Include ... |
| 46 | +# Function Invoke-psake ... |
| 47 | +# Function Properties ... |
| 48 | +# Function Task ... |
| 49 | +# Function TaskSetup ... |
| 50 | +# Function TaskTearDown ... |
| 51 | +``` |
| 52 | + |
| 53 | +### Get Examples for Specific Commands |
| 54 | + |
| 55 | +Use `Get-Help` with the `-Examples` parameter to see usage examples: |
42 | 56 |
|
43 | | -NAME |
44 | | - Assert |
| 57 | +```powershell |
| 58 | +Get-Help Assert -Examples |
| 59 | +
|
| 60 | +# Output: |
| 61 | +# NAME |
| 62 | +# Assert |
| 63 | +# |
| 64 | +# SYNOPSIS |
| 65 | +# Helper function for "Design by Contract" assertion checking. |
| 66 | +# |
| 67 | +# -------------------------- EXAMPLE 1 -------------------------- |
| 68 | +# Assert $false "This always throws an exception" |
| 69 | +# |
| 70 | +# -------------------------- EXAMPLE 2 -------------------------- |
| 71 | +# Assert ( ($i % 2) -eq 0 ) "$i is not an even number" |
| 72 | +``` |
45 | 73 |
|
46 | | -SYNOPSIS |
47 | | - Helper function for "Design by Contract" assertion checking. |
| 74 | +## Community Support |
48 | 75 |
|
49 | | - -------------------------- EXAMPLE 1 -------------------------- |
| 76 | +Need help with your build scripts? The psake community is here to help! |
50 | 77 |
|
51 | | - C:\PS>Assert $false "This always throws an exception" |
| 78 | +### Chat & Discussion |
52 | 79 |
|
| 80 | +- **[PowerShell Discord](https://aka.ms/psdiscord)** - Join the #psake channel for real-time chat |
| 81 | +- **[PowerShell Slack](https://aka.ms/psslack)** - Join the #psake channel for team collaboration |
| 82 | +- **[GitHub Discussions](https://github.com/orgs/psake/discussions)** - For long-form questions and discussions |
53 | 83 |
|
54 | | - This example always throws an exception |
| 84 | +### Q&A |
55 | 85 |
|
| 86 | +- **[Stack Overflow](https://stackoverflow.com/questions/tagged/psake)** - Search existing questions or ask new ones using the `psake` tag |
56 | 87 |
|
| 88 | +### Report Issues |
57 | 89 |
|
| 90 | +Found a bug or have a feature request? |
58 | 91 |
|
59 | | - -------------------------- EXAMPLE 2 -------------------------- |
| 92 | +- **[GitHub Issues](https://github.com/psake/psake/issues)** - Report bugs or request features in the main psake repository |
60 | 93 |
|
61 | | - C:\PS>Assert ( ($i % 2) -eq 0 ) "%i is not an even number" |
| 94 | +## Documentation |
62 | 95 |
|
| 96 | +For comprehensive guides and reference materials: |
63 | 97 |
|
64 | | - This example may throw an exception if $i is not an even number |
65 | | -``` |
| 98 | +- **[Command Reference](/docs/commands/Invoke-psake)** - Detailed documentation for all psake commands |
| 99 | +- **[Troubleshooting](/docs/troubleshooting/common-errors)** - Solutions to common problems |
| 100 | +- **[FAQ](/docs/troubleshooting/faq)** - Frequently asked questions |
0 commit comments