mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 18:02:30 +00:00
Merge pull request #80 from shcgitpf/patch-1
Add 'parent_id' and fix documentation
This commit is contained in:
commit
85fa16ae70
1 changed files with 31 additions and 11 deletions
|
|
@ -1,21 +1,39 @@
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Add a new Model to Snipe-it asset system
|
Add a new Location to Snipe-it asset system
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Long description
|
Long description
|
||||||
|
|
||||||
.PARAMETER name
|
.PARAMETER name
|
||||||
Name of the Asset Model
|
Name of the Location
|
||||||
|
|
||||||
.PARAMETER category_id
|
.PARAMETER address
|
||||||
Category ID that the asset belongs to this can be got using Get-Category
|
Address line 1 of the location
|
||||||
|
|
||||||
.PARAMETER manufacturer_id
|
.PARAMETER address2
|
||||||
Manufacturer ID that the asset belongs to this can be got using Get-Manufacturer
|
Address line 2 of the location
|
||||||
|
|
||||||
.PARAMETER fieldset_id
|
.PARAMETER state
|
||||||
Fieldset ID that the asset uses (Custom fields)
|
Address State of the location
|
||||||
|
|
||||||
|
.PARAMETER country
|
||||||
|
Country of the location
|
||||||
|
|
||||||
|
.PARAMETER zip
|
||||||
|
The zip code of the location
|
||||||
|
|
||||||
|
.PARAMETER ldap_ou
|
||||||
|
The LDAP OU of the location
|
||||||
|
|
||||||
|
.PARAMETER parent_id
|
||||||
|
Parent location ID for the location
|
||||||
|
|
||||||
|
.PARAMETER currency
|
||||||
|
Currency used at the location
|
||||||
|
|
||||||
|
.PARAMETER manager_id
|
||||||
|
The manager ID of the location
|
||||||
|
|
||||||
.PARAMETER url
|
.PARAMETER url
|
||||||
URL of Snipeit system, can be set using Set-Info command
|
URL of Snipeit system, can be set using Set-Info command
|
||||||
|
|
@ -24,7 +42,7 @@
|
||||||
Users API Key for Snipeit, can be set using Set-Info command
|
Users API Key for Snipeit, can be set using Set-Info command
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
New-Model -name "DL380" -manufacturer_id 2 -fieldset_id 2 -category_id 1
|
New-Location -name "Room 1" -address "123 Asset Street" -parent_id 14
|
||||||
#>
|
#>
|
||||||
|
|
||||||
function New-Location() {
|
function New-Location() {
|
||||||
|
|
@ -47,6 +65,8 @@ function New-Location() {
|
||||||
|
|
||||||
[string]$zip,
|
[string]$zip,
|
||||||
|
|
||||||
|
[int]$parent_id,
|
||||||
|
|
||||||
[int]$manager_id,
|
[int]$manager_id,
|
||||||
|
|
||||||
[string]$ldap_ou,
|
[string]$ldap_ou,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue