2021-05-18 05:57:40 +03:00
---
2017-11-18 19:50:47 +00:00
external help file: SnipeItPS-help.xml
2021-05-18 05:57:40 +03:00
Module Name: SnipeitPS
2018-04-29 08:58:34 +01:00
online version: http://go.microsoft.com/fwlink/?LinkId=821589
2017-11-18 19:50:47 +00:00
schema: 2.0.0
---
# Set-Asset
## SYNOPSIS
2017-11-20 09:07:58 +00:00
Update a Asset in the Snipe-it asset system
2017-11-18 19:50:47 +00:00
## SYNTAX
```
2021-05-18 05:57:40 +03:00
Set-Asset [-id] < Int32 > [[-Name] < String > ] [[-Status_id] < String > ] [[-Model_id] < String > ]
[[-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 > ]
[-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
```
2017-11-20 09:07:58 +00:00
Set-Asset -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
```
Set-Asset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" }
```
2017-11-18 19:50:47 +00:00
## PARAMETERS
2021-05-18 05:57:40 +03:00
### -apiKey
Users API Key for Snipeit, can be set using Set-Info command
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 17
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -archived
Whether or not the asset is archived. Archived assets cannot be checked out and do not show up in the deployable asset screens
```yaml
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -assigned_to
The id of the user the asset is currently checked out to
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -company_id
The id of an associated company id
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -customfields
Hastable of custom fields and extra fields that need passing through to Snipeit
```yaml
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 18
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2017-11-20 09:07:58 +00:00
### -id
ID of the Asset
2017-11-18 21:41:35 +00:00
```yaml
2017-11-20 09:07:58 +00: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
2017-11-20 09:07:58 +00:00
Required: True
Position: 1
Default value: 0
2017-11-18 21:41:35 +00:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +03:00
### -last_checkout
Date the asset was last checked out
```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Model_id
Model ID of the asset, this can be got using Get-Model
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2017-11-20 09:07:58 +00:00
### -Name
Name of the Asset
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
2017-11-20 09:07:58 +00:00
Position: 2
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +03:00
### -order_number
Order number for the asset
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
Position: 9
2017-11-18 19:50:47 +00:00
Default value: None
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
```
### -rtd_location_id
The id that corresponds to the location where the asset is usually located when not checked out
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 15
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -serial
Serial number of the asset
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
Position: 8
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +03:00
### -Status_id
Status ID of the asset, this can be got using Get-Status
2017-11-18 21:41:35 +00:00
```yaml
2017-11-20 09:07:58 +00:00
Type: String
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-18 05:57:40 +03:00
Required: False
Position: 3
2017-11-18 21:41:35 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +03:00
### -url
URL of Snipeit system, can be set using Set-Info 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-18 05:57:40 +03:00
Position: 16
2017-11-18 19:50:47 +00:00
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +03:00
### -warranty_months
Number of months for the asset warranty
2017-11-18 19:50:47 +00:00
```yaml
2021-05-18 05:57:40 +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-18 05:57:40 +03:00
Position: 10
Default value: 0
2017-11-18 19:50:47 +00:00
Accept pipeline input: False
Accept wildcard characters: False
```
2021-05-18 05:57:40 +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-18 05:57:40 +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-18 05:57:40 +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-18 05:57:40 +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