Skip to content

Commit a69a583

Browse files
authored
Merge pull request #155 from snazy2000/develop
Corrected examples
2 parents 19fb68f + 0d201e6 commit a69a583

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

SnipeitPS/Public/New-SnipeitAsset.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123"
6161
Specifying asset tag when creating asset
6262
6363
.EXAMPLE
64-
New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" }
64+
New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -customfields = @{ "_snipeit_os_5" = "Windows 10 Pro" }
6565
Using customfields when creating asset.
6666
#>
6767

@@ -120,6 +120,7 @@ function New-SnipeitAsset()
120120
[parameter(mandatory = $true)]
121121
[string]$apiKey,
122122

123+
[Alias('CustomValues')]
123124
[hashtable] $customfields
124125
)
125126

SnipeitPS/Public/Set-SnipeitAsset.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
Set-SnipeitAsset -id 1 -status_id 1 -model_id 1 -name "Machine1"
7070
7171
.EXAMPLE
72-
Set-SnipeitAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" }
72+
Set-SnipeitAsset -id 1 -name "Machine1" -customfields = @{ "_snipeit_os_5" = "Windows 10 Pro" ; "_snipeit_os_version" = "1909" }
7373
7474
.EXAMPLE
7575
Get-SnipeitAsset -serial 12345678 | Set-SnipeitAsset -notes 'Just updated'
@@ -101,7 +101,6 @@ function Set-SnipeitAsset()
101101

102102
[string]$serial,
103103

104-
105104
[string]$order_number,
106105

107106
[int]$warranty_months,
@@ -127,6 +126,7 @@ function Set-SnipeitAsset()
127126
[parameter(mandatory = $true)]
128127
[string]$apiKey,
129128

129+
[Alias('CustomValues')]
130130
[hashtable] $customfields
131131
)
132132
begin{

docs/New-SnipeitAsset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Use internal field names from snipeit .You can use Get-CustomField to get intern
9797
```yaml
9898
Type: Hashtable
9999
Parameter Sets: (All)
100-
Aliases:
100+
Aliases: CustomValues
101101

102102
Required: False
103103
Position: 16

docs/Set-SnipeitAsset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Hastable of custom fields and extra fields that need passing through to Snipeit
110110
```yaml
111111
Type: Hashtable
112112
Parameter Sets: (All)
113-
Aliases:
113+
Aliases: CustomValues
114114

115115
Required: False
116116
Position: 20

0 commit comments

Comments
 (0)