Merge pull request #194 from PetriAsi/feature/support-images

Feature/support images
This commit is contained in:
Petri Asikainen 2021-07-09 14:40:50 +03:00 committed by GitHub
commit 7871fc3711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 969 additions and 93 deletions

View file

@ -57,5 +57,13 @@ function Get-ParameterValue {
} }
finally {} finally {}
} }
#Convert switch parameters to booleans so it converts nicely to json
foreach ( $key in @($ParameterValues.Keys)) {
if ($true -eq $ParameterValues[$key].IsPresent){
$ParameterValues[$key]=$true;
}
}
return $ParameterValues return $ParameterValues
} }

View file

@ -64,12 +64,14 @@
#Place holder for intended image manipulation #Place holder for intended image manipulation
# if and when snipe it API gets support for images # if and when snipe it API gets support for images
if($null -ne $body -and $Body.Keys -contains 'image' ){ if($null -ne $body -and $Body.Keys -contains 'image' ){
if($PSVersionTable.PSVersion -ge 7){ if($PSVersionTable.PSVersion -ge '7.0'){
$Body['image'] = get-item $body['image'] $Body['image'] = get-item $body['image']
$splatParameters["Form"] = $Body $splatParameters["Form"] = $Body
} else { } else {
write-warning "Setting images is supported only with powershell version 7 or greater" # use base64 encoded images for powershell version < 7
$Body.Remove('image') Add-Type -AssemblyName "System.Web"
$mimetype = [System.Web.MimeMapping]::GetMimeMapping($body['image'])
$Body['image'] = 'data:@'+$mimetype+';base64,'+[Convert]::ToBase64String([IO.File]::ReadAllBytes($Body['image']))
} }
} }

View file

@ -53,6 +53,12 @@ ID number of the location the accessory is assigned to
.PARAMETER min_amt .PARAMETER min_amt
Min quantity of the accessory before alert is triggered Min quantity of the accessory before alert is triggered
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -103,6 +109,11 @@ function New-SnipeitAccessory() {
[ValidateRange(1, [int]::MaxValue)] [ValidateRange(1, [int]::MaxValue)]
[int]$location_id, [int]$location_id,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -42,6 +42,12 @@ Optional Purchase cost of the Asset
.PARAMETER rtd_location_id .PARAMETER rtd_location_id
Optional Default location id for the asset Optional Default location id for the asset
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -114,6 +120,11 @@ function New-SnipeitAsset()
[parameter(mandatory = $false)] [parameter(mandatory = $false)]
[int]$rtd_location_id, [int]$rtd_location_id,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -20,6 +20,12 @@ If switch is present, require users to confirm acceptance of assets in this cate
.PARAMETER checkin_email .PARAMETER checkin_email
If switch is present, send email to user on checkin/checkout If switch is present, send email to user on checkin/checkout
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -47,12 +53,17 @@ function New-SnipeitCategory()
[string]$eula_text, [string]$eula_text,
[switch]$use_default_eula, [switch]$use_default_eula,
[switch]$require_acceptance, [switch]$require_acceptance,
[switch]$checkin_email, [switch]$checkin_email,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -8,6 +8,12 @@ Creates new company on Snipe-It system
.PARAMETER name .PARAMETER name
Comapany name Comapany name
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -30,6 +36,11 @@ function New-SnipeitCompany()
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$name, [string]$name,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -26,6 +26,12 @@ Date accessory was purchased
.PARAMETER purchase_cost .PARAMETER purchase_cost
Cost of item being purchased. Cost of item being purchased.
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -65,6 +71,11 @@ function New-SnipeitComponent() {
[float]$purchase_cost, [float]$purchase_cost,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -44,6 +44,12 @@ Model number of the consumable in months
.PARAMETER item_no .PARAMETER item_no
Item number for the consumable Item number for the consumable
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -104,6 +110,11 @@ function New-SnipeitConsumable()
[parameter(mandatory = $false)] [parameter(mandatory = $false)]
[string]$item_no, [string]$item_no,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -17,6 +17,12 @@
.PARAMETER manager_id .PARAMETER manager_id
ID number of manager ID number of manager
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -46,6 +52,11 @@ function New-SnipeitDepartment() {
[string]$notes, [string]$notes,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -38,6 +38,12 @@
.PARAMETER manager_id .PARAMETER manager_id
The manager ID of the location The manager ID of the location
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -78,6 +84,11 @@ function New-SnipeitLocation() {
[string]$ldap_ou, [string]$ldap_ou,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -8,6 +8,12 @@
.PARAMETER Name .PARAMETER Name
Name of the Manufacturer Name of the Manufacturer
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -29,6 +35,11 @@ function New-SnipeitManufacturer()
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$Name, [string]$Name,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -20,6 +20,12 @@
.PARAMETER fieldset_id .PARAMETER fieldset_id
Fieldset ID that the asset uses (Custom fields) Fieldset ID that the asset uses (Custom fields)
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -54,6 +60,11 @@ function New-SnipeitModel()
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[int]$fieldset_id, [int]$fieldset_id,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -50,6 +50,12 @@
.PARAMETER ldap_import .PARAMETER ldap_import
Mark user as import from ldap Mark user as import from ldap
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -104,6 +110,10 @@ function New-SnipeitUser() {
[bool]$ldap_import = $false, [bool]$ldap_import = $false,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -44,6 +44,12 @@ ID number of the supplier for this accessory
.PARAMETER location_id .PARAMETER location_id
ID number of the location the accessory is assigned to ID number of the location the accessory is assigned to
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
@ -90,6 +96,11 @@ function Set-SnipeitAccessory() {
[Nullable[System.Int32]]$location_id, [Nullable[System.Int32]]$location_id,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -53,8 +53,14 @@
.PARAMETER notes .PARAMETER notes
Notes about asset Notes about asset
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER RequestType .PARAMETER RequestType
Http request type to send Snipe IT system. Defaults to Put youc use Patch if needed Http request type to send Snipe IT system. Defaults to Patch you could use Put if needed.
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command URL of Snipeit system, can be set using Set-SnipeitInfoeItInfo command
@ -122,6 +128,11 @@ function Set-SnipeitAsset()
[ValidateSet("Put","Patch")] [ValidateSet("Put","Patch")]
[string]$RequestType = "Patch", [string]$RequestType = "Patch",
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -8,12 +8,6 @@ Name of new category to be created
.PARAMETER type .PARAMETER type
Type of new category to be created (asset, accessory, consumable, component, license) Type of new category to be created (asset, accessory, consumable, component, license)
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command
.PARAMETER apiKey
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.PARAMETER use_default_eula .PARAMETER use_default_eula
If switch is present, use the primary default EULA If switch is present, use the primary default EULA
@ -26,6 +20,18 @@ If switch is present, require users to confirm acceptance of assets in this cate
.PARAMETER checkin_email .PARAMETER checkin_email
Should the user be emailed the EULA and/or an acceptance confirmation email when this item is checked in? Should the user be emailed the EULA and/or an acceptance confirmation email when this item is checked in?
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command
.PARAMETER apiKey
User's API Key for Snipeit, can be set using Set-SnipeitInfo command
.EXAMPLE .EXAMPLE
Set-SnipeitCategory -id 4 -name "Laptops" Set-SnipeitCategory -id 4 -name "Laptops"
#> #>
@ -54,6 +60,11 @@ function Set-SnipeitCategory()
[bool]$checkin_email, [bool]$checkin_email,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -11,6 +11,12 @@ ID number of company
.PARAMETER name .PARAMETER name
Company name Company name
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -37,6 +43,11 @@ function Set-SnipeitCompany()
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$name, [string]$name,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -32,6 +32,12 @@ Date accessory was purchased
.PARAMETER purchase_cost .PARAMETER purchase_cost
Cost of item being purchased. Cost of item being purchased.
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -73,6 +79,11 @@ function Set-SnipeitComponent()
[float]$purchase_cost, [float]$purchase_cost,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -47,6 +47,12 @@ Model number of the consumable in months
.PARAMETER item_no .PARAMETER item_no
Item number for the consumable Item number for the consumable
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -112,6 +118,11 @@ function Set-SnipeitConsumable()
[parameter(mandatory = $false)] [parameter(mandatory = $false)]
[string]$item_no, [string]$item_no,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -20,6 +20,12 @@
.PARAMETER manager_id .PARAMETER manager_id
ID number of manager ID number of manager
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -51,6 +57,11 @@ function Set-SnipeitDepartment() {
[string]$notes, [string]$notes,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -44,6 +44,12 @@
.PARAMETER parent_id .PARAMETER parent_id
Parent location as id Parent location as id
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -88,6 +94,11 @@ function Set-SnipeitLocation() {
[Nullable[System.Int32]]$parent_id, [Nullable[System.Int32]]$parent_id,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -23,6 +23,12 @@
.PARAMETER fieldset_id .PARAMETER fieldset_id
Fieldset ID that the asset uses (Custom fields) Fieldset ID that the asset uses (Custom fields)
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -57,6 +63,11 @@ function Set-SnipeitModel() {
[Alias("fieldset_id")] [Alias("fieldset_id")]
[Nullable[System.Int32]]$custom_fieldset_id, [Nullable[System.Int32]]$custom_fieldset_id,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -53,6 +53,12 @@
.PARAMETER ldap_import .PARAMETER ldap_import
Mark user as import from ldap Mark user as import from ldap
.PARAMETER image
Image file name and path for item
.PARAMETER image_delete
Remove current image
.PARAMETER url .PARAMETER url
URL of Snipeit system, can be set using Set-SnipeitInfo command URL of Snipeit system, can be set using Set-SnipeitInfo command
@ -107,6 +113,11 @@ function Set-SnipeitUser() {
[string]$notes, [string]$notes,
[ValidateScript({Test-Path $_})]
[string]$image,
[switch]$image_delete=$false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,

View file

@ -16,7 +16,8 @@ Creates new accessory on Snipe-It system
New-SnipeitAccessory [-name] <String> [-qty] <Int32> [-category_id] <Int32> [[-company_id] <Int32>] New-SnipeitAccessory [-name] <String> [-qty] <Int32> [-category_id] <Int32> [[-company_id] <Int32>]
[[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-model_number] <String>] [[-purchase_cost] <Single>] [[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-model_number] <String>] [[-purchase_cost] <Single>]
[[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>] [[-location_id] <Int32>] [[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>] [[-location_id] <Int32>]
[-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -40,7 +41,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 14 Position: 15
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -76,6 +77,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -location_id ### -location_id
ID number of the location the accessory is assigned to ID number of the location the accessory is assigned to
@ -235,7 +266,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 13 Position: 14
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -16,8 +16,8 @@ Add a new Asset to Snipe-it asset system
New-SnipeitAsset [-status_id] <Int32> [-model_id] <Int32> [[-name] <String>] [[-asset_tag] <String>] New-SnipeitAsset [-status_id] <Int32> [-model_id] <Int32> [[-name] <String>] [[-asset_tag] <String>]
[[-serial] <String>] [[-company_id] <Int32>] [[-order_number] <String>] [[-notes] <String>] [[-serial] <String>] [[-company_id] <Int32>] [[-order_number] <String>] [[-notes] <String>]
[[-warranty_months] <Int32>] [[-purchase_cost] <String>] [[-purchase_date] <DateTime>] [[-warranty_months] <Int32>] [[-purchase_cost] <String>] [[-purchase_date] <DateTime>]
[[-supplier_id] <Int32>] [[-rtd_location_id] <Int32>] [-url] <String> [-apiKey] <String> [[-supplier_id] <Int32>] [[-rtd_location_id] <Int32>] [[-image] <String>] [-image_delete] [-url] <String>
[[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>] [-apiKey] <String> [[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -54,7 +54,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 15 Position: 16
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -100,12 +100,42 @@ Parameter Sets: (All)
Aliases: CustomValues Aliases: CustomValues
Required: False Required: False
Position: 16 Position: 17
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -model_id ### -model_id
Required Model ID of the asset, this can be got using Get-Model Required Model ID of the asset, this can be got using Get-Model
@ -265,7 +295,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 14 Position: 15
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -14,8 +14,8 @@ Create a new Snipe-IT Category
``` ```
New-SnipeitCategory [-name] <String> [-category_type] <String> [[-eula_text] <String>] [-use_default_eula] New-SnipeitCategory [-name] <String> [-category_type] <String> [[-eula_text] <String>] [-use_default_eula]
[-require_acceptance] [-checkin_email] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [-require_acceptance] [-checkin_email] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String>
[<CommonParameters>] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +39,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 5 Position: 6
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -90,6 +90,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -name ### -name
Name of new category to be created Name of new category to be created
@ -129,7 +159,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 4 Position: 5
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -13,8 +13,8 @@ Creates a new Company
## SYNTAX ## SYNTAX
``` ```
New-SnipeitCompany [-name] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] New-SnipeitCompany [-name] <String> [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String>
[<CommonParameters>] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -38,12 +38,42 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 3 Position: 4
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -name ### -name
Comapany name Comapany name
@ -68,7 +98,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 2 Position: 3
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -15,7 +15,8 @@ Create a new component
``` ```
New-SnipeitComponent [-name] <String> [-category_id] <Int32> [-qty] <String> [[-company_id] <Int32>] New-SnipeitComponent [-name] <String> [-category_id] <Int32> [-qty] <String> [[-company_id] <Int32>]
[[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>] [[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>]
[-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +40,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 10 Position: 11
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -75,6 +76,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -location_id ### -location_id
ID number of the location the accessory is assigned to ID number of the location the accessory is assigned to
@ -174,7 +205,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 9 Position: 10
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -16,8 +16,8 @@ Add a new Consumable to Snipe-it asset system
New-SnipeitConsumable [-name] <String> [-qty] <Int32> [-category_id] <Int32> [[-min_amt] <Int32>] New-SnipeitConsumable [-name] <String> [-qty] <Int32> [-category_id] <Int32> [[-min_amt] <Int32>]
[[-company_id] <Int32>] [[-order_number] <String>] [[-manufacturer_id] <Int32>] [[-location_id] <Int32>] [[-company_id] <Int32>] [[-order_number] <String>] [[-manufacturer_id] <Int32>] [[-location_id] <Int32>]
[[-requestable] <Boolean>] [[-purchase_date] <DateTime>] [[-purchase_cost] <String>] [[-requestable] <Boolean>] [[-purchase_date] <DateTime>] [[-purchase_cost] <String>]
[[-model_number] <String>] [[-item_no] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-model_number] <String>] [[-item_no] <String>] [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -42,7 +42,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 15 Position: 16
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -78,6 +78,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -item_no ### -item_no
Item number for the consumable Item number for the consumable
@ -252,7 +282,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 14 Position: 15
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -14,7 +14,8 @@ Creates a department
``` ```
New-SnipeitDepartment [-name] <String> [[-company_id] <Int32>] [[-location_id] <Int32>] [[-manager_id] <Int32>] New-SnipeitDepartment [-name] <String> [[-company_id] <Int32>] [[-location_id] <Int32>] [[-manager_id] <Int32>]
[[-notes] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-notes] <String>] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf]
[-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -38,7 +39,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: 8
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -59,6 +60,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -location_id ### -location_id
ID number of location ID number of location
@ -128,7 +159,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: 7
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -15,8 +15,8 @@ Add a new Location to Snipe-it asset system
``` ```
New-SnipeitLocation [-name] <String> [[-address] <String>] [[-address2] <String>] [[-city] <String>] New-SnipeitLocation [-name] <String> [[-address] <String>] [[-address2] <String>] [[-city] <String>]
[[-state] <String>] [[-country] <String>] [[-zip] <String>] [[-currency] <String>] [[-parent_id] <Int32>] [[-state] <String>] [[-country] <String>] [[-zip] <String>] [[-currency] <String>] [[-parent_id] <Int32>]
[[-manager_id] <Int32>] [[-ldap_ou] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-manager_id] <Int32>] [[-ldap_ou] <String>] [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -70,7 +70,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 13 Position: 14
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -121,6 +121,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ldap_ou ### -ldap_ou
The LDAP OU of the location The LDAP OU of the location
@ -205,7 +235,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 12 Position: 13
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -13,8 +13,8 @@ Add a new Manufacturer to Snipe-it asset system
## SYNTAX ## SYNTAX
``` ```
New-SnipeitManufacturer [-Name] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] New-SnipeitManufacturer [-Name] <String> [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String>
[<CommonParameters>] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -38,12 +38,42 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 3 Position: 4
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -Name ### -Name
Name of the Manufacturer Name of the Manufacturer
@ -68,7 +98,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 2 Position: 3
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -14,8 +14,8 @@ Add a new Model to Snipe-it asset system
``` ```
New-SnipeitModel [-name] <String> [[-model_number] <String>] [-category_id] <Int32> [-manufacturer_id] <Int32> New-SnipeitModel [-name] <String> [[-model_number] <String>] [-category_id] <Int32> [-manufacturer_id] <Int32>
[[-eol] <Int32>] [-fieldset_id] <Int32> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-eol] <Int32>] [-fieldset_id] <Int32> [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String>
[<CommonParameters>] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +39,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 8 Position: 9
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -90,6 +90,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -manufacturer_id ### -manufacturer_id
Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer
@ -144,7 +174,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: 8
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -16,8 +16,8 @@ Creates a new user
New-SnipeitUser [-first_name] <String> [-last_name] <String> [-username] <String> [[-password] <String>] New-SnipeitUser [-first_name] <String> [-last_name] <String> [-username] <String> [[-password] <String>]
[[-activated] <Boolean>] [[-notes] <String>] [[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>] [[-activated] <Boolean>] [[-notes] <String>] [[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>]
[[-company_id] <Int32>] [[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>] [[-company_id] <Int32>] [[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>]
[[-employee_num] <String>] [[-ldap_import] <Boolean>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-employee_num] <String>] [[-ldap_import] <Boolean>] [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -57,7 +57,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 17 Position: 18
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -138,6 +138,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -jobtitle ### -jobtitle
Users job tittle Users job tittle
@ -267,7 +297,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 16 Position: 17
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -16,7 +16,8 @@ Updates accessory on Snipe-It system
Set-SnipeitAccessory [-id] <Int32[]> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>] Set-SnipeitAccessory [-id] <Int32[]> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>]
[[-company_id] <Int32>] [[-manufacturer_id] <Int32>] [[-model_number] <String>] [[-order_number] <String>] [[-company_id] <Int32>] [[-manufacturer_id] <Int32>] [[-model_number] <String>] [[-order_number] <String>]
[[-purchase_cost] <Single>] [[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>] [[-purchase_cost] <Single>] [[-purchase_date] <DateTime>] [[-min_amt] <Int32>] [[-supplier_id] <Int32>]
[[-location_id] <Int32>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-location_id] <Int32>] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf]
[-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -40,7 +41,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 15 Position: 16
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -91,6 +92,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -location_id ### -location_id
ID number of the location the accessory is assigned to ID number of the location the accessory is assigned to
@ -250,7 +281,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 14 Position: 15
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -17,8 +17,8 @@ Set-SnipeitAsset [-id] <Int32[]> [[-name] <String>] [[-status_id] <Int32>] [[-mo
[[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>] [[-serial] <String>] [[-last_checkout] <DateTime>] [[-assigned_to] <Int32>] [[-company_id] <Int32>] [[-serial] <String>]
[[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>] [[-order_number] <String>] [[-warranty_months] <Int32>] [[-purchase_cost] <Double>]
[[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>] [[-purchase_date] <DateTime>] [[-requestable] <Boolean>] [[-archived] <Boolean>] [[-rtd_location_id] <Int32>]
[[-notes] <String>] [[-RequestType] <String>] [-url] <String> [-apiKey] <String> [[-customfields] <Hashtable>] [[-notes] <String>] [[-RequestType] <String>] [[-image] <String>] [-image_delete] [-url] <String>
[-WhatIf] [-Confirm] [<CommonParameters>] [-apiKey] <String> [[-customfields] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -52,7 +52,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 19 Position: 20
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -113,7 +113,7 @@ Parameter Sets: (All)
Aliases: CustomValues Aliases: CustomValues
Required: False Required: False
Position: 20 Position: 21
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -134,6 +134,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 18
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -last_checkout ### -last_checkout
Date the asset was last checked out Date the asset was last checked out
@ -256,7 +286,7 @@ Accept wildcard characters: False
### -RequestType ### -RequestType
Http request type to send Snipe IT system. Http request type to send Snipe IT system.
Defaults to Put youc use Patch if needed Defaults to Patch you could use Put if needed.
```yaml ```yaml
Type: String Type: String
@ -324,7 +354,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 18 Position: 19
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -14,8 +14,9 @@ Create a new Snipe-IT Category
``` ```
Set-SnipeitCategory [-id] <Int32[]> [[-name] <String>] [[-category_type] <String>] [[-eula_text] <String>] Set-SnipeitCategory [-id] <Int32[]> [[-name] <String>] [[-category_type] <String>] [[-eula_text] <String>]
[[-use_default_eula] <Boolean>] [[-require_acceptance] <Boolean>] [[-checkin_email] <Boolean>] [-url] <String> [[-use_default_eula] <Boolean>] [[-require_acceptance] <Boolean>] [[-checkin_email] <Boolean>]
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
[<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +40,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 9 Position: 10
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -105,6 +106,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -name ### -name
Name of new category to be created Name of new category to be created
@ -144,7 +175,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 8 Position: 9
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -13,8 +13,8 @@ Updates company name
## SYNTAX ## SYNTAX
``` ```
Set-SnipeitCompany [-id] <Int32[]> [-name] <String> [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] Set-SnipeitCompany [-id] <Int32[]> [-name] <String> [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -38,7 +38,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 4 Position: 5
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -59,6 +59,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -name ### -name
Company name Company name
@ -83,7 +113,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 3 Position: 4
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -15,7 +15,8 @@ Updates component
``` ```
Set-SnipeitComponent [-id] <Int32[]> [-qty] <Int32> [[-min_amt] <Int32>] [[-name] <String>] Set-SnipeitComponent [-id] <Int32[]> [-qty] <Int32> [[-min_amt] <Int32>] [[-name] <String>]
[[-company_id] <Int32>] [[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>] [[-company_id] <Int32>] [[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>]
[[-purchase_cost] <Single>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-purchase_cost] <Single>] [[-image] <String>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf]
[-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +40,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 11 Position: 12
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -75,6 +76,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -location_id ### -location_id
ID number of the location the accessory is assigned to ID number of the location the accessory is assigned to
@ -189,7 +220,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 10 Position: 11
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -16,8 +16,8 @@ Add a new Consumable to Snipe-it asset system
Set-SnipeitConsumable [-id] <Int32[]> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>] Set-SnipeitConsumable [-id] <Int32[]> [[-name] <String>] [[-qty] <Int32>] [[-category_id] <Int32>]
[[-min_amt] <Int32>] [[-company_id] <Int32>] [[-order_number] <String>] [[-manufacturer_id] <Int32>] [[-min_amt] <Int32>] [[-company_id] <Int32>] [[-order_number] <String>] [[-manufacturer_id] <Int32>]
[[-location_id] <Int32>] [[-requestable] <Boolean>] [[-purchase_date] <DateTime>] [[-purchase_cost] <String>] [[-location_id] <Int32>] [[-requestable] <Boolean>] [[-purchase_date] <DateTime>] [[-purchase_cost] <String>]
[[-model_number] <String>] [[-item_no] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-model_number] <String>] [[-item_no] <String>] [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -42,7 +42,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 16 Position: 17
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -93,6 +93,36 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 15
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -item_no ### -item_no
Item number for the consumable Item number for the consumable
@ -267,7 +297,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 15 Position: 16
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -14,8 +14,8 @@ Updates a department
``` ```
Set-SnipeitDepartment [-id] <Int32[]> [[-name] <String>] [[-company_id] <Int32>] [[-location_id] <Int32>] Set-SnipeitDepartment [-id] <Int32[]> [[-name] <String>] [[-company_id] <Int32>] [[-location_id] <Int32>]
[[-manager_id] <Int32>] [[-notes] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-manager_id] <Int32>] [[-notes] <String>] [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +39,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 8 Position: 9
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -75,6 +75,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -location_id ### -location_id
ID number of location ID number of location
@ -144,7 +174,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: 8
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -15,8 +15,8 @@ Updates Location in Snipe-it asset system
``` ```
Set-SnipeitLocation [-id] <Int32[]> [[-name] <String>] [[-address] <String>] [[-address2] <String>] Set-SnipeitLocation [-id] <Int32[]> [[-name] <String>] [[-address] <String>] [[-address2] <String>]
[[-state] <String>] [[-country] <String>] [[-zip] <String>] [[-city] <String>] [[-currency] <String>] [[-state] <String>] [[-country] <String>] [[-zip] <String>] [[-city] <String>] [[-currency] <String>]
[[-manager_id] <Int32>] [[-ldap_ou] <String>] [[-parent_id] <Int32>] [-url] <String> [-apiKey] <String> [[-manager_id] <Int32>] [[-ldap_ou] <String>] [[-parent_id] <Int32>] [[-image] <String>] [-image_delete]
[-WhatIf] [-Confirm] [<CommonParameters>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -70,7 +70,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 14 Position: 15
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -136,6 +136,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ldap_ou ### -ldap_ou
LDAP OU of Location LDAP OU of Location
@ -220,7 +250,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 13 Position: 14
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -14,8 +14,8 @@ Updates Model on Snipe-it asset system
``` ```
Set-SnipeitModel [-id] <Int32[]> [[-name] <String>] [[-model_number] <String>] [[-category_id] <Int32>] Set-SnipeitModel [-id] <Int32[]> [[-name] <String>] [[-model_number] <String>] [[-category_id] <Int32>]
[[-manufacturer_id] <Int32>] [[-eol] <Int32>] [[-custom_fieldset_id] <Int32>] [-url] <String> [[-manufacturer_id] <Int32>] [[-eol] <Int32>] [[-custom_fieldset_id] <Int32>] [[-image] <String>]
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-image_delete] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +39,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 9 Position: 10
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -105,6 +105,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -manufacturer_id ### -manufacturer_id
Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer
@ -159,7 +189,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 8 Position: 9
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -16,8 +16,8 @@ Creates a new user
Set-SnipeitUser [-id] <Int32[]> [[-first_name] <String>] [[-last_name] <String>] [[-userName] <String>] Set-SnipeitUser [-id] <Int32[]> [[-first_name] <String>] [[-last_name] <String>] [[-userName] <String>]
[[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>] [[-password] <String>] [[-company_id] <Int32>] [[-jobtitle] <String>] [[-email] <String>] [[-phone] <String>] [[-password] <String>] [[-company_id] <Int32>]
[[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>] [[-employee_num] <String>] [[-location_id] <Int32>] [[-department_id] <Int32>] [[-manager_id] <Int32>] [[-employee_num] <String>]
[[-activated] <Boolean>] [[-notes] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [[-activated] <Boolean>] [[-notes] <String>] [[-image] <String>] [-image_delete] [-url] <String>
[<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -57,7 +57,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 17 Position: 18
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -153,6 +153,36 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -image
Image file name and path for item
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -image_delete
Remove current image
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -jobtitle ### -jobtitle
Users job tittle Users job tittle
@ -267,7 +297,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 16 Position: 17
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False