2021-05-22 18:44:36 +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
2021-05-19 15:51:49 +03:00
online version:
2017-11-18 19:50:47 +00:00
schema: 2.0.0
---
2021-05-22 18:44:36 +03:00
# New-SnipeItAsset
2017-11-18 19:50:47 +00:00
## SYNOPSIS
2017-11-20 09:07:58 +00:00
Add a new Asset to Snipe-it asset system
2017-11-18 19:50:47 +00:00
## SYNTAX
```
2021-05-22 18:44:36 +03:00
New-SnipeItAsset [-status_id] < Int32 > [-model_id] < Int32 > [[-name] < String > ] [[-asset_tag] < String > ]
2021-05-18 05:57:40 +03:00
[[-serial] < String > ] [[-company_id] < Int32 > ] [[-order_number] < String > ] [[-notes] < String > ]
[[-warranty_months] < Int32 > ] [[-purchase_cost] < String > ] [[-purchase_date] < String > ] [[-supplier_id] < Int32 > ]
[[-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
New-Asset -status_id 1 -model_id 1 -name "Machine1"
2017-11-18 19:50:47 +00:00
```
2021-05-19 15:51:49 +03:00
Create asset with automatic tag if tag genaration is enabled on snipe-it, other wise without tag
2021-05-18 05:57:40 +03:00
### EXAMPLE 2
2017-11-20 09:07:58 +00:00
```
2021-05-19 15:51:49 +03:00
New-Asset -status_id 1 -model_id 1 -name "Machine1" -asset_tag "DEV123"
2017-11-20 09:07:58 +00:00
```
2017-11-18 19:50:47 +00:00
2021-05-19 15:51:49 +03:00
Specifying asset tag when creating asset
### EXAMPLE 3
```
New-Asset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5" = "Windows 10 Pro" }
```
Using customfields when creating asset.
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
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: True
Position: 15
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
### -asset_tag
Asset Tag for the Asset, not required when snipe asset_tag autogeneration is on.
2017-11-18 19:50:47 +00:00
```yaml
Type: String
Parameter Sets: (All)
2021-05-18 05:57:40 +03:00
Aliases: tag
2017-11-18 19:50:47 +00:00
2021-05-18 05:57:40 +03:00
Required: False
Position: 4
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
### -company_id
Optional Company id
2017-11-18 19:50:47 +00:00
```yaml
2018-04-29 08:58:34 +01: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
2021-05-18 05:57:40 +03:00
Required: False
Position: 6
2018-04-29 08:58:34 +01:00
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
### -customfields
2021-05-19 15:51:49 +03:00
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.
2021-05-18 05:57:40 +03:00
```yaml
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -model_id
2021-05-19 15:51:49 +03:00
Required Model ID of the asset, this can be got using Get-Model
2017-11-18 19:50:47 +00:00
```yaml
2018-04-29 08:58:34 +01: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: True
2021-05-18 05:57:40 +03:00
Position: 2
2018-04-29 08:58:34 +01:00
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
### -name
2021-05-19 15:51:49 +03:00
Optional Name of the Asset
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
### -notes
Optional Notes
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
### -order_number
Optional Order number
2017-11-18 19:50:47 +00:00
```yaml
2021-05-18 05:57:40 +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
Required: False
2017-11-20 09:07:58 +00:00
Position: 7
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
Optional Purchase cost of the Asset
2017-11-18 19:50:47 +00:00
```yaml
2021-05-18 05:57:40 +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
2017-11-20 09:07:58 +00:00
Required: False
2021-05-18 05:57:40 +03:00
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -purchase_date
Optional Purchase cost of the Asset
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
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
### -rtd_location_id
Optional Default location id for the asset
```yaml
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
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -status_id
2021-05-19 15:51:49 +03:00
Required Status ID of the asset, this can be got using Get-Status
2021-05-18 05:57:40 +03:00
```yaml
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 }}
```yaml
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-Info command
```yaml
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 }}
```yaml
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
2017-11-20 09:07:58 +00:00
### -Confirm
Prompts you for confirmation before running the cmdlet.
2017-11-18 19:50:47 +00:00
2017-11-20 09:07:58 +00:00
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
2017-11-18 19:50:47 +00:00
2017-11-20 09:07:58 +00:00
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
2017-11-18 19:50:47 +00:00
2021-05-18 05:57:40 +03:00
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
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-20 09:07:58 +00:00
## INPUTS
2017-11-18 19:50:47 +00:00
2017-11-20 09:07:58 +00:00
## OUTPUTS
2017-11-18 19:50:47 +00:00
## NOTES
## RELATED LINKS