5.8 KiB
| external help file | Module Name | online version | schema |
|---|---|---|---|
| SnipeItPS-help.xml | SnipeitPS | 2.0.0 |
New-SnipeItAsset
SYNOPSIS
Add a new Asset to Snipe-it asset system
SYNTAX
New-SnipeItAsset [-status_id] <Int32> [-model_id] <Int32> [[-name] <String>] [[-asset_tag] <String>]
[[-serial] <String>] [[-company_id] <Int32>] [[-order_number] <String>] [[-notes] <String>]
[[-warranty_months] <Int32>] [[-purchase_cost] <String>] [[-purchase_date] <DateTime>]
[[-supplier_id] <Int32>] [[-rtd_location_id] <Int32>] [-url] <String> [-apiKey] <String>
[[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Long description
EXAMPLES
EXAMPLE 1
New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1"
Create asset with automatic tag if tag genaration is enabled on snipe-it, other wise without tag
EXAMPLE 2
New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123"
Specifying asset tag when creating asset
EXAMPLE 3
New-SnipeItAsset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" }
Using customfields when creating asset.
PARAMETERS
-apiKey
Users API Key for Snipeit, can be set using Set-SnipeItInfo command
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-asset_tag
Asset Tag for the Asset, not required when snipe asset_tag autogeneration is on.
Type: String
Parameter Sets: (All)
Aliases: tag
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-company_id
Optional Company id
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
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. Use internal field names from snipeit .You can use Get-CustomField to get internal field names.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-model_id
Required Model ID of the asset, this can be got using Get-Model
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-name
Optional Name of the Asset
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-notes
Optional Notes
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-order_number
Optional Order number
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-purchase_cost
Optional Purchase cost of the Asset
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-purchase_date
Optional Purchase cost of the Asset
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-rtd_location_id
Optional Default location id for the asset
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-serial
Optional Serial number of the Asset
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-status_id
Required Status ID of the asset, this can be got using Get-Status
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-supplier_id
{{ Fill supplier_id Description }}
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-url
URL of Snipeit system, can be set using Set-SnipeItInfo command
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-warranty_months
{{ Fill warranty_months Description }}
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
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.