Skip to content

Commit

Permalink
Merge pull request #155 from snazy2000/develop
Browse files Browse the repository at this point in the history
Corrected examples
  • Loading branch information
PetriAsi authored Jun 10, 2021
2 parents 19fb68f + 0d201e6 commit a69a583
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion SnipeitPS/Public/New-SnipeitAsset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123"
Specifying asset tag when creating asset
.EXAMPLE
New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" }
New-SnipeitAsset -status_id 1 -model_id 1 -name "Machine1" -customfields = @{ "_snipeit_os_5" = "Windows 10 Pro" }
Using customfields when creating asset.
#>

Expand Down Expand Up @@ -120,6 +120,7 @@ function New-SnipeitAsset()
[parameter(mandatory = $true)]
[string]$apiKey,

[Alias('CustomValues')]
[hashtable] $customfields
)

Expand Down
4 changes: 2 additions & 2 deletions SnipeitPS/Public/Set-SnipeitAsset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
Set-SnipeitAsset -id 1 -status_id 1 -model_id 1 -name "Machine1"
.EXAMPLE
Set-SnipeitAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" }
Set-SnipeitAsset -id 1 -name "Machine1" -customfields = @{ "_snipeit_os_5" = "Windows 10 Pro" ; "_snipeit_os_version" = "1909" }
.EXAMPLE
Get-SnipeitAsset -serial 12345678 | Set-SnipeitAsset -notes 'Just updated'
Expand Down Expand Up @@ -101,7 +101,6 @@ function Set-SnipeitAsset()

[string]$serial,


[string]$order_number,

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

[Alias('CustomValues')]
[hashtable] $customfields
)
begin{
Expand Down
2 changes: 1 addition & 1 deletion docs/New-SnipeitAsset.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Use internal field names from snipeit .You can use Get-CustomField to get intern
```yaml
Type: Hashtable
Parameter Sets: (All)
Aliases:
Aliases: CustomValues

Required: False
Position: 16
Expand Down
2 changes: 1 addition & 1 deletion docs/Set-SnipeitAsset.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Hastable of custom fields and extra fields that need passing through to Snipeit
```yaml
Type: Hashtable
Parameter Sets: (All)
Aliases:
Aliases: CustomValues

Required: False
Position: 20
Expand Down

0 comments on commit a69a583

Please sign in to comment.