File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Get-Greeting
2+
3+ ## Synopsis
4+
5+ Gets a personalised greeting message.
6+
7+ ## Description
8+
9+ This function creates a friendly greeting message for the specified person.
10+ It can optionally include the current time in the greeting.
11+
12+ ## Syntax
13+
14+ ``` powershell
15+ Get-Greeting [-Name <String>] [-IncludeTime] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-InformationAction <ActionPreference>] [-ProgressAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-InformationVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-PipelineVariable <String>]
16+ ```
17+
18+ ## Parameters
19+
20+ ### -Name
21+
22+ The name of the person to greet. This parameter is mandatory.
23+
24+ - ** Type** : String
25+ - ** Required** : true
26+ - ** Position** : 1
27+ - ** Default value** : None
28+ - ** Accepts pipeline input** : false
29+
30+ ### -IncludeTime
31+
32+ When specified, includes the current time in the greeting message.
33+
34+ - ** Type** : SwitchParameter
35+ - ** Required** : false
36+ - ** Position** : named
37+ - ** Default value** : False
38+ - ** Accepts pipeline input** : false
39+
40+ ## Examples
41+
42+ ### Example 1
43+
44+ Returns: "Hello Alice, how are you today?"
45+
46+ ``` powershell
47+ Get-Greeting -Name "Alice"
48+ ```
49+
50+ ### Example 2
51+
52+ Returns: "Hello Bob, how are you today? The time is 14:30:25"
53+
54+ ``` powershell
55+ Get-Greeting -Name "Bob" -IncludeTime
56+ ```
Original file line number Diff line number Diff line change 1+ # Invoke-ClassDemo
2+
3+ ## Synopsis
4+
5+ Demonstrates the use of both PowerShell and C# classes.
6+
7+ ## Description
8+
9+ This function showcases the SimpleCalculator PowerShell class and StringHelper C# class
10+ by performing basic operations and returning the results in a formatted object.
11+
12+ ## Syntax
13+
14+ ``` powershell
15+ Invoke-ClassDemo [[-FirstNumber <Int32>]] [[-SecondNumber <Int32>]] [[-TestString <String>]] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-InformationAction <ActionPreference>] [-ProgressAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-InformationVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-PipelineVariable <String>]
16+ ```
17+
18+ ## Parameters
19+
20+ ### -FirstNumber
21+
22+ The first number for the calculation. Default is 10.
23+
24+ - ** Type** : Int32
25+ - ** Required** : false
26+ - ** Position** : 1
27+ - ** Default value** : 10
28+ - ** Accepts pipeline input** : false
29+
30+ ### -SecondNumber
31+
32+ The second number for the calculation. Default is 5.
33+
34+ - ** Type** : Int32
35+ - ** Required** : false
36+ - ** Position** : 2
37+ - ** Default value** : 5
38+ - ** Accepts pipeline input** : false
39+
40+ ### -TestString
41+
42+ The string to manipulate using the C# StringHelper class. Default is "Hello World".
43+
44+ - ** Type** : String
45+ - ** Required** : false
46+ - ** Position** : 3
47+ - ** Default value** : Hello World
48+ - ** Accepts pipeline input** : false
49+
50+ ## Examples
51+
52+ ### Example 1
53+
54+ Uses default values to demonstrate both classes.
55+
56+ ``` powershell
57+ Invoke-ClassDemo
58+ ```
59+
60+ ### Example 2
61+
62+ Performs calculations with 20 and 8, and manipulates the string "PowerShell Rocks".
63+
64+ ``` powershell
65+ Invoke-ClassDemo -FirstNumber 20 -SecondNumber 8 -TestString "PowerShell Rocks"
66+ ```
Original file line number Diff line number Diff line change 1+ # Set-SimpleMessage
2+
3+ ## Synopsis
4+
5+ Sets a simple message to display.
6+
7+ ## Description
8+
9+ This function allows you to set a custom message that can be displayed.
10+ The message is returned as output and can be stored or displayed as needed.
11+
12+ ## Syntax
13+
14+ ``` powershell
15+ Set-SimpleMessage [-Message <String>] [-ToUpper] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-InformationAction <ActionPreference>] [-ProgressAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-InformationVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-PipelineVariable <String>]
16+ ```
17+
18+ ## Parameters
19+
20+ ### -Message
21+
22+ The message text to set. This parameter is mandatory.
23+
24+ - ** Type** : String
25+ - ** Required** : true
26+ - ** Position** : 1
27+ - ** Default value** : None
28+ - ** Accepts pipeline input** : false
29+
30+ ### -ToUpper
31+
32+ When specified, converts the message to uppercase before returning it.
33+
34+ - ** Type** : SwitchParameter
35+ - ** Required** : false
36+ - ** Position** : named
37+ - ** Default value** : False
38+ - ** Accepts pipeline input** : false
39+
40+ ## Examples
41+
42+ ### Example 1
43+
44+ Returns: "Welcome to PowerShell"
45+
46+ ``` powershell
47+ Set-SimpleMessage -Message "Welcome to PowerShell"
48+ ```
49+
50+ ### Example 2
51+
52+ Returns: "HELLO WORLD"
53+
54+ ``` powershell
55+ Set-SimpleMessage -Message "hello world" -ToUpper
56+ ```
You can’t perform that action at this time.
0 commit comments