SnipeitPS/docs/Set-SnipeItAsset.md

352 lines
6.1 KiB
Markdown
Raw Normal View History

---
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
2021-05-19 15:51:49 +03:00
online version:
2017-11-18 19:50:47 +00:00
schema: 2.0.0
---
# 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
```
Set-SnipeItAsset [-id] <Int32> [[-Name] <String>] [[-Status_id] <String>] [[-Model_id] <String>]
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>]
[-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-05-23 23:22:23 +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-05-23 23:22:23 +03:00
Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" }
2017-11-20 09:07:58 +00:00
```
2017-11-18 19:50:47 +00:00
## PARAMETERS
2021-05-23 23:24:44 +03:00
### -apiKey
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-23 23:24:44 +03:00
Position: 17
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
Default value: 0
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
Default value: 0
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)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 18
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
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
2021-05-23 23:24:44 +03:00
Required: True
Position: 1
2017-11-20 09:07:58 +00: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
### -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-23 23:24:44 +03:00
### -Model_id
Model ID of the asset, this can be got using Get-Model
2021-05-18 05:57:40 +03:00
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
2021-05-23 23:24:44 +03:00
Position: 4
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
### -Name
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-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-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
Default value: 0
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-23 23:24:44 +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-23 23:24:44 +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-23 23:24:44 +03:00
### -url
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-23 23:24:44 +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-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
Default value: 0
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