Skip to content

Commit

Permalink
Merge pull request #243 from PetriAsi/feature/#242
Browse files Browse the repository at this point in the history
Added #242: Set-SnipeitAsset  set asset_tag
  • Loading branch information
PetriAsi authored Oct 28, 2021
2 parents 2a6d62b + 83e8e43 commit ec40912
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 23 deletions.
6 changes: 6 additions & 0 deletions SnipeitPS/Public/Set-SnipeitAsset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
.PARAMETER id
ID of the Asset or array of IDs
.PARAMETER asset_tag
New tag for asset.
.PARAMETER Name
Asset name
Expand Down Expand Up @@ -91,6 +94,9 @@ function Set-SnipeitAsset() {
[parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int[]]$id,

[parameter(Mandatory=$false)]
[string]
$asset_tag,

[string]$name,

Expand Down
61 changes: 38 additions & 23 deletions docs/Set-SnipeitAsset.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Update a specific Asset in the Snipe-it asset system
## SYNTAX

```
Set-SnipeitAsset [-id] <Int32[]> [[-name] <String>] [[-status_id] <Int32>] [[-model_id] <Int32>]
[[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>] [[-serial] <String>]
[[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>]
Set-SnipeitAsset [-id] <Int32[]> [[-asset_tag] <String>] [[-name] <String>] [[-status_id] <Int32>]
[[-model_id] <Int32>] [[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>]
[[-serial] <String>] [[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>]
[[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>]
[[-notes] <String>] [[-RequestType] <String>] [[-image] <String>] [-image_delete] [[-url] <String>]
[[-apiKey] <String>] [[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]
Expand Down Expand Up @@ -53,7 +53,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 20
Position: 21
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -69,12 +69,27 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 14
Position: 15
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -asset_tag
New tag for asset.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -assigned_to
The id of the user the asset is currently checked out to
Expand All @@ -84,7 +99,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -99,7 +114,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -114,7 +129,7 @@ Parameter Sets: (All)
Aliases: CustomValues

Required: False
Position: 21
Position: 22
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down Expand Up @@ -144,7 +159,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 18
Position: 19
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down Expand Up @@ -174,7 +189,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -189,7 +204,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Position: 5
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -204,7 +219,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -219,7 +234,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 16
Position: 17
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -234,7 +249,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -249,7 +264,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 11
Position: 12
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -264,7 +279,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 12
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -279,7 +294,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 13
Position: 14
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -295,7 +310,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 17
Position: 18
Default value: Patch
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -310,7 +325,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 15
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -325,7 +340,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -340,7 +355,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -356,7 +371,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 19
Position: 20
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand All @@ -371,7 +386,7 @@ Parameter Sets: (All)
Aliases:

Required: False
Position: 10
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Expand Down

0 comments on commit ec40912

Please sign in to comment.