2021-05-22 18:44:36 +03:00
---
2021-06-08 20:20:03 +03:00
external help file: SnipeitPS-help.xml
2021-05-18 05:57:40 +03:00
Module Name: SnipeitPS
2021-05-19 15:51:49 +03:00
online version:
2017-11-18 19:50:47 +00:00
schema: 2.0.0
---
2021-06-08 20:23:32 +03:00
# Set-SnipeitAsset
2017-11-18 19:50:47 +00:00
## SYNOPSIS
2021-05-19 15:51:49 +03:00
Update a specific Asset in the Snipe-it asset system
2017-11-18 19:50:47 +00:00
## SYNTAX
```
2021-06-08 20:23:32 +03:00
Set-SnipeitAsset [-id] < Int32 [ ] > [[-name] < String > ] [[-status_id] < Int32 > ] [[-model_id] < Int32 > ]
2021-05-18 05:57:40 +03:00
[[-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 > ]
2021-05-25 15:44:14 +03:00
[[-notes] < String > ] [[-RequestType] < String > ] [-url] < String > [-apiKey] < String > [[-customfields] < Hashtable > ]
[-WhatIf] [-Confirm] [< CommonParameters > ]
2017-11-18 19:50:47 +00:00
```
## DESCRIPTION
2017-11-20 09:07:58 +00:00
Long description
2017-11-18 19:50:47 +00:00
## EXAMPLES
2021-05-18 05:57:40 +03:00
### EXAMPLE 1
2017-11-18 19:50:47 +00:00
```
2021-06-08 20:23:32 +03:00
Set-SnipeitAsset -id 1 -status_id 1 -model_id 1 -name "Machine1"
2017-11-18 19:50:47 +00:00
```
2021-05-18 05:57:40 +03:00
### EXAMPLE 2
2017-11-20 09:07:58 +00:00
```
2021-06-12 12:30:41 +03:00
Set-SnipeitAsset -id 1 -name "Machine1" -customfields = @{ "_snipeit_os_5" = "Windows 10 Pro" ; "_snipeit_os_version" = "1909" }
2017-11-20 09:07:58 +00:00
```
2017-11-18 19:50:47 +00:00
2021-06-08 22:04:25 +03:00
### EXAMPLE 3
```
Get-SnipeitAsset -serial 12345678 | Set-SnipeitAsset -notes 'Just updated'
```
2017-11-18 19:50:47 +00:00
## PARAMETERS
2021-05-23 23:24:44 +03:00
### -apiKey
2021-06-08 20:23:32 +03:00
Users API Key for Snipeit, can be set using Set-SnipeitInfoeItInfo command
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: String
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: True
2021-05-25 15:44:14 +03:00
Position: 19
2021-05-23 23:24:44 +03:00
Default value: None
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -archived
Whether or not the asset is archived.
Archived assets cannot be checked out and do not show up in the deployable asset screens
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: Boolean
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 14
Default value: False
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -assigned_to
The id of the user the asset is currently checked out to
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: Int32
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 6
2021-06-16 10:37:57 +03:00
Default value: None
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -company_id
The id of an associated company id
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: Int32
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 7
2021-06-16 10:37:57 +03:00
Default value: None
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -customfields
Hastable of custom fields and extra fields that need passing through to Snipeit
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: Hashtable
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
2021-06-10 19:02:16 +03:00
Aliases: CustomValues
2021-05-18 05:57:40 +03:00
Required: False
2021-05-25 15:44:14 +03:00
Position: 20
2021-05-18 05:57:40 +03:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -id
2021-06-08 22:04:25 +03:00
ID of the Asset or array of IDs
2017-11-18 21:41:35 +00:00
```yaml
2021-06-06 06:22:08 +03:00
Type: Int32[]
2017-11-18 21:41:35 +00:00
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 21:41:35 +00:00
2021-05-23 23:24:44 +03:00
Required: True
Position: 1
2021-06-08 22:04:25 +03:00
Default value: None
2021-06-06 06:22:08 +03:00
Accept pipeline input: True (ByPropertyName)
2017-11-18 21:41:35 +00:00
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -last_checkout
Date the asset was last checked out
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: DateTime
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 5
Default value: None
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-25 11:17:22 +03:00
### -model_id
2021-05-23 23:24:44 +03:00
Model ID of the asset, this can be got using Get-Model
2021-05-18 05:57:40 +03:00
```yaml
2021-05-25 11:17:22 +03:00
Type: Int32
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 4
2021-05-25 11:17:22 +03:00
Default value: 0
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-27 14:51:22 +03:00
### -name
2021-05-23 23:24:44 +03:00
Asset name
2017-11-18 19:50:47 +00:00
```yaml
Type: String
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 19:50:47 +00:00
2021-05-18 05:57:40 +03:00
Required: False
2021-05-23 23:24:44 +03:00
Position: 2
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-25 15:44:14 +03:00
### -notes
Notes about asset
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -order_number
Order number for the asset
2017-11-18 19:50:47 +00:00
```yaml
2021-05-23 23:24:44 +03:00
Type: String
2017-11-18 19:50:47 +00:00
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 19:50:47 +00:00
2021-05-18 05:57:40 +03:00
Required: False
2021-05-23 23:24:44 +03:00
Position: 9
Default value: None
2017-11-18 19:50:47 +00:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +03:00
### -purchase_cost
Purchase cost of the asset, without a currency symbol
```yaml
Type: Double
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -purchase_date
Date of asset purchase
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -requestable
Whether or not the asset can be requested by users with the permission to request assets
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-25 15:44:14 +03:00
### -RequestType
Http request type to send Snipe IT system.
Defaults to Put youc use Patch if needed
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 17
Default value: Patch
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -rtd_location_id
The id that corresponds to the location where the asset is usually located when not checked out
2021-05-18 05:57:40 +03:00
```yaml
2021-05-23 23:24:44 +03:00
Type: Int32
2021-05-18 05:57:40 +03:00
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 15
2021-06-16 10:37:57 +03:00
Default value: None
2021-05-18 05:57:40 +03:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -serial
Serial number of the asset
2017-11-18 19:50:47 +00:00
```yaml
2021-05-23 23:24:44 +03:00
Type: String
2017-11-18 19:50:47 +00:00
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 19:50:47 +00:00
2021-05-18 05:57:40 +03:00
Required: False
2021-05-23 23:24:44 +03:00
Position: 8
Default value: None
2017-11-18 19:50:47 +00:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-25 11:17:22 +03:00
### -status_id
2021-05-23 23:24:44 +03:00
Status ID of the asset, this can be got using Get-Status
2017-11-18 21:41:35 +00:00
```yaml
2021-05-25 11:17:22 +03:00
Type: Int32
2017-11-18 21:41:35 +00:00
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 21:41:35 +00:00
2021-05-23 23:24:44 +03:00
Required: False
Position: 3
2021-05-25 11:17:22 +03:00
Default value: 0
2017-11-18 21:41:35 +00:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -url
2021-06-08 20:23:32 +03:00
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
2017-11-18 19:50:47 +00:00
```yaml
Type: String
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 19:50:47 +00:00
Required: True
2021-05-25 15:44:14 +03:00
Position: 18
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -warranty_months
Number of months for the asset warranty
2017-11-18 19:50:47 +00:00
```yaml
2021-05-23 23:24:44 +03:00
Type: Int32
2017-11-18 19:50:47 +00:00
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases:
2017-11-18 19:50:47 +00:00
Required: False
2021-05-23 23:24:44 +03:00
Position: 10
2021-06-16 10:37:57 +03:00
Default value: None
2017-11-18 19:50:47 +00:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -Confirm
Prompts you for confirmation before running the cmdlet.
2017-11-18 19:50:47 +00:00
```yaml
2017-11-20 09:07:58 +00:00
Type: SwitchParameter
2017-11-18 19:50:47 +00:00
Parameter Sets: (All)
2021-05-23 23:24:44 +03:00
Aliases: cf
2017-11-18 19:50:47 +00:00
2017-11-20 09:07:58 +00:00
Required: False
Position: Named
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-23 23:24:44 +03:00
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
2017-11-18 19:50:47 +00:00
```yaml
2017-11-20 09:07:58 +00:00
Type: SwitchParameter
2017-11-18 19:50:47 +00:00
Parameter Sets: (All)
2021-05-23 23:24:44 +03:00
Aliases: wi
2017-11-18 19:50:47 +00:00
2017-11-20 09:07:58 +00:00
Required: False
Position: Named
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2018-04-29 08:58:34 +01:00
### CommonParameters
2021-05-18 05:57:40 +03:00
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters ](http://go.microsoft.com/fwlink/?LinkID=113216 ).
2018-04-29 08:58:34 +01:00
2017-11-18 19:50:47 +00:00
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS