|
1 | 1 | # PSCustomObject |
2 | 2 |
|
3 | | -This module provides a set of functions for working with PowerShell custom objects (PSCustomObject). |
4 | | - |
5 | | -## Prerequisites |
6 | | - |
7 | | -This uses the following external resources: |
8 | | -- The [PSModule framework](https://github.com/PSModule) for building, testing and publishing the module. |
| 3 | +PSCustomObject is a PowerShell module for missing PSCustomObject helper functions. |
9 | 4 |
|
10 | 5 | ## Installation |
11 | 6 |
|
12 | | -To install the module from the PowerShell Gallery, you can use the following command: |
| 7 | +Install the module from the PowerShell Gallery: |
13 | 8 |
|
14 | 9 | ```powershell |
15 | 10 | Install-PSResource -Name PSCustomObject |
16 | 11 | Import-Module -Name PSCustomObject |
17 | 12 | ``` |
18 | 13 |
|
19 | | -## Usage |
20 | | - |
21 | | -Here is a list of example that are typical use cases for the module. |
| 14 | +## Documentation |
22 | 15 |
|
23 | | -### Example 1: Compare two objects |
| 16 | +Documentation is published at [psmodule.io/PSCustomObject](https://psmodule.io/PSCustomObject/). |
24 | 17 |
|
25 | | -This example shows how to compare two objects and get the differences between them. |
| 18 | +Use PowerShell help and command discovery for module details: |
26 | 19 |
|
27 | 20 | ```powershell |
28 | | -$object1 = [PSCustomObject]@{ |
29 | | - Name = 'Test' |
30 | | - Value = 1 |
31 | | -} |
32 | | -
|
33 | | -$object2 = [PSCustomObject]@{ |
34 | | - Name = 'Test' |
35 | | - Value = 2 |
36 | | -} |
37 | | -
|
38 | | -$object1 | Compare-PSCustomObject $object2 |
39 | | -
|
40 | | -# Output: |
41 | | -# Property Left Right Changed |
42 | | -# -------- ---- ----- ------- |
43 | | -# Name Test Test False |
44 | | -# Value 1 2 True |
45 | | -
|
| 21 | +Get-Command -Module PSCustomObject |
| 22 | +Get-Help <CommandName> -Examples |
46 | 23 | ``` |
47 | 24 |
|
48 | | -### Example 2: Compare two objects showing only changed properties |
49 | | - |
50 | | -This example shows how to compare two objects and get the differences between them. |
51 | | - |
52 | | -```powershell |
53 | | -$object1 = [PSCustomObject]@{ |
54 | | - Name = 'Test' |
55 | | - Value = 1 |
56 | | -} |
57 | | -
|
58 | | -$object2 = [PSCustomObject]@{ |
59 | | - Name = 'Test' |
60 | | - Value = 2 |
61 | | -} |
62 | | -
|
63 | | -$object1 | Compare-PSCustomObject $object2 -OnlyChanged |
64 | | -
|
65 | | -# Output: |
66 | | -# Property Left Right Changed |
67 | | -# -------- ---- ----- ------- |
68 | | -# Value 1 2 True |
69 | | -
|
70 | | -``` |
71 | | - |
72 | | -### Find more examples |
73 | | - |
74 | | -To find more examples of how to use the module, please refer to the [examples](examples) folder. |
75 | | - |
76 | | -Alternatively, you can use the Get-Command -Module 'This module' to find more commands that are available in the module. |
77 | | -To find examples of each of the commands you can use Get-Help -Examples 'CommandName'. |
78 | | - |
79 | 25 | ## Contributing |
80 | 26 |
|
81 | | -Coder or not, you can contribute to the project! We welcome all contributions. |
82 | | - |
83 | | -### For Users |
84 | | - |
85 | | -If you don't code, you still sit on valuable information that can make this project even better. If you experience that the |
86 | | -product does unexpected things, throw errors or is missing functionality, you can help by submitting bugs and feature requests. |
87 | | -Please see the issues tab on this project and submit a new issue that matches your needs. |
88 | | - |
89 | | -### For Developers |
90 | | - |
91 | | -If you do code, we'd love to have your contributions. Please read the [Contribution guidelines](CONTRIBUTING.md) for more information. |
92 | | -You can either help by picking up an existing issue or submit a new one if you have an idea for a new feature or improvement. |
| 27 | +Issues and pull requests are welcome. Please use the repository issue tracker to report bugs, request features, or discuss improvements. |
0 commit comments