6.6 KiB
| external help file | Module Name | online version | schema |
|---|---|---|---|
| SnipeItPS-help.xml | SnipeitPS | 2.0.0 |
Set-SnipeItAsset
SYNOPSIS
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>]
[[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>]
[[-notes] <String>] [[-RequestType] <String>] [-url] <String> [-apiKey] <String> [[-customfields] <Hashtable>]
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Long description
EXAMPLES
EXAMPLE 1
Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1"
EXAMPLE 2
Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" }
PARAMETERS
-apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfoeItInfo command
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 19
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
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
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
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
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 20
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-id
ID of the Asset
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-last_checkout
Date the asset was last checked out
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
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Name
Asset name
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-notes
Notes about asset
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-order_number
Order number for the asset
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-purchase_cost
Purchase cost of the asset, without a currency symbol
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
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
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-RequestType
Http request type to send Snipe IT system. Defaults to Put youc use Patch if needed
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 17
Default value: Patch
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
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
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-status_id
Status ID of the asset, this can be got using Get-Status
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-url
URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 18
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-warranty_months
Number of months for the asset warranty
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.