Merge pull request #141 from snazy2000/develop

Release 1.5
This commit is contained in:
Petri Asikainen 2021-06-08 17:00:03 +03:00 committed by GitHub
commit f8f5224cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 935 additions and 566 deletions

View file

@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/), The format is based on [Keep a Changelog](http://keepachangelog.com/),
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
# [v1.5.x] - 2021-06-08
## Piping input
### New features
Most of "Set" command accepts piped input. Piped objects "id" attribute
is used to select asset set values. Like
Get-SnipeItAsset -model_id 213 | Set-SnipeItAsset -notes 'This is nice!'
Set command accept id parameter as array, so its easier to set multiple items
in one run.
Parameter sets. Get commands have now parameters sets.This will make syntax more
clear between search and get by ID use. Use get-help to
### Fixes
-Empty strings are accepted as input so it's possible to wipe field values if
needed
# [v1.4.x] - 2021-05-27 # [v1.4.x] - 2021-05-27
## More Activity ## More Activity

View file

@ -21,16 +21,15 @@ Update-Module SnipeitPS
# To use each session: # To use each session:
Import-Module SnipeitPS Import-Module SnipeitPS
Set-Info -URL 'https://asset.example.com' -apiKey 'tokenKey' Set-SnipeItInfo -URL 'https://asset.example.com' -apiKey 'tokenKey'
``` ```
### Usage ### Usage
```powershell ```powershell
# Review the help at any time! # Review the help at any time!
Get-Help about_SnipeitPS
Get-Command -Module SnipeitPS Get-Command -Module SnipeitPS
Get-Help Get-Asset -Full # or any other command Get-Help Get-SnipeItAsset -Full # or any other command
``` ```
### Reporting bugs and issues ### Reporting bugs and issues
Please use -Verbose switch with command you have problem with. Please use -Verbose switch with command you have problem with.

View file

@ -25,6 +25,8 @@ function Get-ParameterValue {
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
$Parameters $Parameters
, ,
[parameter(mandatory = $true)]
$BoundParameters,
[string[]]$DefaultExcludeParameter = @("id", "url", "apiKey", 'Debug', 'Verbose','RequestType','customfields') [string[]]$DefaultExcludeParameter = @("id", "url", "apiKey", 'Debug', 'Verbose','RequestType','customfields')
) )
@ -40,11 +42,16 @@ function Get-ParameterValue {
try { try {
$key = $parameter.Key $key = $parameter.Key
if ($key -notin $DefaultExcludeParameter) { if ($key -notin $DefaultExcludeParameter) {
#Fill in default parameters values
if ($null -ne ($value = Get-Variable -Name $key -ValueOnly -ErrorAction Ignore )) { if ($null -ne ($value = Get-Variable -Name $key -ValueOnly -ErrorAction Ignore )) {
if ($value -ne ($null -as $parameter.Value.ParameterType)) { if ($value -ne ($null -as $parameter.Value.ParameterType)) {
$ParameterValues[$key] = $value $ParameterValues[$key] = $value
} }
} }
#Fill in all given parameters even empty
if ($BoundParameters.ContainsKey($key)) {
$ParameterValues[$key] = $BoundParameters[$key]
}
} }
} }

View file

@ -36,25 +36,38 @@ Get-SnipeItAccessory -id 1
function Get-SnipeItAccessory() { function Get-SnipeItAccessory() {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get by ID')]
[int]$id,
[parameter(ParameterSetName='Search')]
[int]$company_id, [int]$company_id,
[parameter(ParameterSetName='Search')]
[int]$category_id, [int]$category_id,
[parameter(ParameterSetName='Search')]
[int]$manufacturer_id, [int]$manufacturer_id,
[parameter(ParameterSetName='Search')]
[int]$supplier_id, [int]$supplier_id,
[parameter(ParameterSetName='Search')]
[string]$sort = "created_at", [string]$sort = "created_at",
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -65,7 +78,11 @@ function Get-SnipeItAccessory() {
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($id -and $search){
throw "Please specify only one of -id or -search parameter"
}
$SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Parameters = @{ $Parameters = @{
Uri = "$url/api/v1/accessories" Uri = "$url/api/v1/accessories"
@ -74,6 +91,10 @@ function Get-SnipeItAccessory() {
Token = $apiKey Token = $apiKey
} }
if($id){
$Parameters.Uri ="$url/api/v1/accessories/$id"
}
if ($all) { if ($all) {
$offstart = $(if($offset){$offset} Else {0}) $offstart = $(if($offset){$offset} Else {0})
$callargs = $SearchParameter $callargs = $SearchParameter

View file

@ -88,7 +88,7 @@ function Get-SnipeItActivity() {
throw "Please specify both item_type and item_id" throw "Please specify both item_type and item_id"
} }
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Parameters = @{ $Parameters = @{

View file

@ -74,43 +74,63 @@ Get-SnipeItAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token
function Get-SnipeItAsset() { function Get-SnipeItAsset() {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with id')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Get with asset tag')]
[string]$asset_tag, [string]$asset_tag,
[string]$asset_serial, [parameter(ParameterSetName='Get with serial')]
[Alias('asset_serial')]
[string]$serial,
[int]$order_number, [parameter(ParameterSetName='Search')]
[string]$order_number,
[parameter(ParameterSetName='Search')]
[int]$model_id, [int]$model_id,
[parameter(ParameterSetName='Search')]
[int]$category_id, [int]$category_id,
[parameter(ParameterSetName='Search')]
[int]$manufacturer_id, [int]$manufacturer_id,
[parameter(ParameterSetName='Search')]
[int]$company_id, [int]$company_id,
[parameter(ParameterSetName='Search')]
[int]$location_id, [int]$location_id,
[parameter(ParameterSetName='Search')]
[int]$depreciation_id, [int]$depreciation_id,
[parameter(ParameterSetName='Search')]
[bool]$requestable = $false, [bool]$requestable = $false,
[parameter(ParameterSetName='Search')]
[string]$status, [string]$status,
[parameter(ParameterSetName='Search')]
[int]$status_id, [int]$status_id,
[parameter(ParameterSetName='Search')]
[string]$sort = "created_at", [string]$sort = "created_at",
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$url, [string]$url,
@ -120,7 +140,7 @@ function Get-SnipeItAsset() {
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/hardware" $apiurl = "$url/api/v1/hardware"

View file

@ -64,7 +64,7 @@ function Get-SnipeItAssetMaintenance() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Parameters = @{ $Parameters = @{
Uri = "$url/api/v1/maintenances" Uri = "$url/api/v1/maintenances"

View file

@ -34,17 +34,23 @@ Get-SnipeItCategory -search "Laptop"
function Get-SnipeItCategory() function Get-SnipeItCategory()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -55,7 +61,7 @@ function Get-SnipeItCategory()
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/categories" $apiurl = "$url/api/v1/categories"

View file

@ -35,17 +35,23 @@ Gets specific company
function Get-SnipeItCompany() function Get-SnipeItCompany()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory=$true)] [parameter(mandatory=$true)]
@ -57,7 +63,7 @@ function Get-SnipeItCompany()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/companies" $apiurl = "$url/api/v1/companies"

View file

@ -39,26 +39,36 @@ Returns specific component
function Get-SnipeItComponent() { function Get-SnipeItComponent() {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[int]$category_id, [int]$category_id,
[parameter(ParameterSetName='Search')]
[int]$company_id, [int]$company_id,
[parameter(ParameterSetName='Search')]
[int]$location_id, [int]$location_id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[ValidateSet('id', 'name', 'min_amt', 'order_number', 'serial', 'purchase_date', 'purchase_cost', 'company', 'category', 'qty', 'location', 'image', 'created_at')] [ValidateSet('id', 'name', 'min_amt', 'order_number', 'serial', 'purchase_date', 'purchase_cost', 'company', 'category', 'qty', 'location', 'image', 'created_at')]
[string]$sort = "created_at", [string]$sort = "created_at",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -70,7 +80,7 @@ function Get-SnipeItComponent() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/components" $apiurl = "$url/api/v1/components"

View file

@ -37,19 +37,26 @@ Get-SnipeItDepartment -id 1
function Get-SnipeItDepartment() function Get-SnipeItDepartment()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(ParameterSetName='Search')]
[ValidateSet('id', 'name', 'image', 'users_count', 'created_at')] [ValidateSet('id', 'name', 'image', 'users_count', 'created_at')]
[string]$sort = "created_at", [string]$sort = "created_at",
@ -62,7 +69,7 @@ function Get-SnipeItDepartment()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/departments" $apiurl = "$url/api/v1/departments"

View file

@ -34,42 +34,60 @@ Get-SnipeItLicense -id 1
function Get-SnipeItLicense() { function Get-SnipeItLicense() {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[string]$name, [string]$name,
[parameter(ParameterSetName='Search')]
[int] $company_id, [int] $company_id,
[parameter(ParameterSetName='Search')]
[string]$product_key, [string]$product_key,
[int]$order_number, [parameter(ParameterSetName='Search')]
[string]$order_number,
[parameter(ParameterSetName='Search')]
[string]$purchase_order, [string]$purchase_order,
[parameter(ParameterSetName='Search')]
[string]$license_name, [string]$license_name,
[parameter(ParameterSetName='Search')]
[mailaddress]$license_email, [mailaddress]$license_email,
[parameter(ParameterSetName='Search')]
[int]$manufacturer_id, [int]$manufacturer_id,
[parameter(ParameterSetName='Search')]
[int]$supplier_id, [int]$supplier_id,
[parameter(ParameterSetName='Search')]
[int]$depreciation_id, [int]$depreciation_id,
[parameter(ParameterSetName='Search')]
[int]$category_id, [int]$category_id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[ValidateSet('id', 'name', 'purchase_cost', 'expiration_date', 'purchase_order', 'order_number', 'notes', 'purchase_date', 'serial', 'company', 'category', 'license_name', 'license_email', 'free_seats_count', 'seats', 'manufacturer', 'supplier')] [ValidateSet('id', 'name', 'purchase_cost', 'expiration_date', 'purchase_order', 'order_number', 'notes', 'purchase_date', 'serial', 'company', 'category', 'license_name', 'license_email', 'free_seats_count', 'seats', 'manufacturer', 'supplier')]
[string]$sort = "created_at", [string]$sort = "created_at",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -81,7 +99,7 @@ function Get-SnipeItLicense() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/licenses" $apiurl = "$url/api/v1/licenses"

View file

@ -56,7 +56,7 @@ function Get-SnipeItLicenseSeat() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/licenses/$id/seats" $apiurl = "$url/api/v1/licenses/$id/seats"

View file

@ -34,17 +34,23 @@ Get-SnipeItLocation -id 3
function Get-SnipeitLocation() function Get-SnipeitLocation()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -56,7 +62,7 @@ function Get-SnipeitLocation()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/locations" $apiurl = "$url/api/v1/locations"

View file

@ -36,17 +36,23 @@ Returns manufacturer with id 3
function Get-SnipeItManufacturer() function Get-SnipeItManufacturer()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -58,7 +64,7 @@ function Get-SnipeItManufacturer()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/manufacturers" $apiurl = "$url/api/v1/manufacturers"

View file

@ -34,17 +34,23 @@ Get-SnipeItModel -id 1
function Get-SnipeItModel() function Get-SnipeItModel()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -56,7 +62,7 @@ function Get-SnipeItModel()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/models" $apiurl = "$url/api/v1/models"

View file

@ -34,17 +34,23 @@ Get-SnipeItStatus -id 3
function Get-SnipeItStatus() function Get-SnipeItStatus()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -56,7 +62,7 @@ function Get-SnipeItStatus()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/statuslabels" $apiurl = "$url/api/v1/statuslabels"

View file

@ -34,17 +34,23 @@ Get-SnipeItSupplier -id 2
function Get-SnipeItSupplier() function Get-SnipeItSupplier()
{ {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[int]$id, [int]$id,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -56,7 +62,7 @@ function Get-SnipeItSupplier()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/suppliers" $apiurl = "$url/api/v1/suppliers"

View file

@ -44,29 +44,41 @@ Get-SnipeItUser -email user@somedomain.com
function Get-SnipeItUser() { function Get-SnipeItUser() {
Param( Param(
[parameter(ParameterSetName='Search')]
[string]$search, [string]$search,
[parameter(ParameterSetName='Get with ID')]
[string]$id, [string]$id,
[parameter(ParameterSetName='Search')]
[int]$company_id, [int]$company_id,
[parameter(ParameterSetName='Search')]
[int]$location_id, [int]$location_id,
[parameter(ParameterSetName='Search')]
[int]$group_id, [int]$group_id,
[parameter(ParameterSetName='Search')]
[int]$department_id, [int]$department_id,
[parameter(ParameterSetName='Search')]
[string]$username, [string]$username,
[parameter(ParameterSetName='Search')]
[string]$email, [string]$email,
[parameter(ParameterSetName='Search')]
[ValidateSet("asc", "desc")] [ValidateSet("asc", "desc")]
[string]$order = "desc", [string]$order = "desc",
[parameter(ParameterSetName='Search')]
[int]$limit = 50, [int]$limit = 50,
[parameter(ParameterSetName='Search')]
[int]$offset, [int]$offset,
[parameter(ParameterSetName='Search')]
[switch]$all = $false, [switch]$all = $false,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -78,7 +90,7 @@ function Get-SnipeItUser() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$SearchParameter = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$apiurl = "$url/api/v1/users" $apiurl = "$url/api/v1/users"

View file

@ -8,6 +8,9 @@ Creates new accessory on Snipe-It system
.PARAMETER name .PARAMETER name
Accessory name Accessory name
.PARAMETER notes
Notes about the accessory
.PARAMETER qty .PARAMETER qty
Quantity of the accessory you have Quantity of the accessory you have
@ -104,7 +107,7 @@ function New-SnipeItAccessory() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['purchase_date']) { if ($values['purchase_date']) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")

View file

@ -125,7 +125,7 @@ function New-SnipeItAsset()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['purchase_date']) { if ($values['purchase_date']) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")

View file

@ -79,7 +79,7 @@ function New-SnipeItAssetMaintenance() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['start_date']) { if ($values['start_date']) {
$values['start_date'] = $values['start_date'].ToString("yyyy-MM-dd") $values['start_date'] = $values['start_date'].ToString("yyyy-MM-dd")

View file

@ -39,7 +39,7 @@ function New-SnipeItCompany()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;

View file

@ -17,6 +17,9 @@ Quantity of the components you have
.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 order_number
Order number of the component
.PARAMETER purchase_date .PARAMETER purchase_date
Date accessory was purchased Date accessory was purchased
@ -56,6 +59,8 @@ function New-SnipeItComponent() {
[int]$location_id, [int]$location_id,
[string]$order_number,
[datetime]$purchase_date, [datetime]$purchase_date,
[float]$purchase_cost, [float]$purchase_cost,
@ -69,7 +74,7 @@ function New-SnipeItComponent() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['purchase_date']) { if ($values['purchase_date']) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")

View file

@ -48,7 +48,7 @@ function New-SnipeItCustomField()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
#Convert Values to JSON format #Convert Values to JSON format
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;

View file

@ -55,7 +55,7 @@ function New-SnipeItDepartment() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;

View file

@ -126,7 +126,7 @@ function New-SnipeItLicense() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['expiration_date']) { if ($values['expiration_date']) {
$values['expiration_date'] = $values['expiration_date'].ToString("yyyy-MM-dd") $values['expiration_date'] = $values['expiration_date'].ToString("yyyy-MM-dd")

View file

@ -87,7 +87,7 @@ function New-SnipeItLocation() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;

View file

@ -111,7 +111,7 @@ function New-SnipeItUser() {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($password ) { if ($password ) {
$Values['password_confirmation'] = $password $Values['password_confirmation'] = $password

View file

@ -6,7 +6,10 @@ Updates accessory on Snipe-It system
Updates accessory on Snipe-It system Updates accessory on Snipe-It system
.PARAMETER name .PARAMETER name
ID number of Accessory on Snipe-It system ID number of Accessory or array of IDs on Snipe-It system
.PARAMETER notes
Notes about the accessory
.PARAMETER qty .PARAMETER qty
Quantity of the accessory you have Quantity of the accessory you have
@ -64,8 +67,8 @@ function Set-SnipeItAccessory() {
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[ValidateLength(3, 255)] [ValidateLength(3, 255)]
[string]$name, [string]$name,
@ -81,6 +84,7 @@ function Set-SnipeItAccessory() {
[ValidateRange(1, [int]::MaxValue)] [ValidateRange(1, [int]::MaxValue)]
[int]$manufacturer_id, [int]$manufacturer_id,
[string]$order_number, [string]$order_number,
[float]$purchase_cost, [float]$purchase_cost,
@ -99,27 +103,34 @@ function Set-SnipeItAccessory() {
[string]$apiKey [string]$apiKey
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name begin {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['purchase_date']) { if ($values['purchase_date']) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
}
$Body = $Values | ConvertTo-Json;
Write-Verbose "Body: $Body"
}
process {
foreach($accessory_id in $id){
$Parameters = @{
Uri = "$url/api/v1/accessories/$accessory_id"
Method = 'Patch'
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$result = Invoke-SnipeitMethod @Parameters
}
$result
}
} }
$Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/accessories/$id"
Method = 'POST'
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$result = Invoke-SnipeitMethod @Parameters
}
$result
} }

View file

@ -5,7 +5,7 @@
Checkout accessory to user Checkout accessory to user
.PARAMETER id .PARAMETER id
Unique ID For accessory to checkout Unique ID For accessory or array of IDs to checkout
.PARAMETER assigned_id .PARAMETER assigned_id
Id of target user Id of target user
@ -30,8 +30,8 @@ function Set-SnipeItAccessoryOwner()
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[int]$assigned_to, [int]$assigned_to,
@ -44,22 +44,27 @@ function Set-SnipeItAccessoryOwner()
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$apiKey [string]$apiKey
) )
begin{
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json;
$Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/accessories/$id/checkout"
Method = 'POST'
Body = $Body
Token = $apiKey
} }
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) process {
{ foreach($accessory_id in $id){
$result = Invoke-SnipeitMethod @Parameters $Parameters = @{
} Uri = "$url/api/v1/accessories/$accessory_id/checkout"
Method = 'POST'
Body = $Body
Token = $apiKey
}
return $result If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-SnipeitMethod @Parameters
}
return $result
}
}
} }

View file

@ -6,7 +6,7 @@
Long description Long description
.PARAMETER id .PARAMETER id
ID of the Asset ID of the Asset or array of IDs
.PARAMETER Name .PARAMETER Name
Asset name Asset name
@ -70,6 +70,9 @@
.EXAMPLE .EXAMPLE
Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } Set-SnipeItAsset -id 1 -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" }
.EXAMPLE
Get-SnipeItAsset -serial 12345678 | Set-SnipeItAsset -notes 'Just updated'
#> #>
function Set-SnipeItAsset() function Set-SnipeItAsset()
@ -80,8 +83,9 @@ function Set-SnipeItAsset()
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[string]$name, [string]$name,
@ -97,6 +101,7 @@ function Set-SnipeItAsset()
[string]$serial, [string]$serial,
[string]$order_number, [string]$order_number,
[int]$warranty_months, [int]$warranty_months,
@ -124,33 +129,38 @@ function Set-SnipeItAsset()
[hashtable] $customfields [hashtable] $customfields
) )
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['purchase_date']) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
}
if ($values['purchase_date']) { if ($customfields)
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") {
$Values += $customfields
}
$Body = $Values | ConvertTo-Json;
} }
if ($customfields) process {
{ foreach($asset_id in $id){
$Values += $customfields $Parameters = @{
Uri = "$url/api/v1/hardware/$asset_id"
Method = $RequestType
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-SnipeitMethod @Parameters
}
$result
}
} }
$Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/hardware/$id"
Method = $RequestType
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-SnipeitMethod @Parameters
}
$result
} }

View file

@ -5,7 +5,7 @@
Checkout asset to user/localtion/asset Checkout asset to user/localtion/asset
.PARAMETER ID .PARAMETER ID
Unique ID For asset to checkout Unique IDs For assets to checkout
.PARAMETER assigned_id .PARAMETER assigned_id
Id of target user , location or asset Id of target user , location or asset
@ -41,8 +41,8 @@ function Set-SnipeItAssetOwner()
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[int]$assigned_id, [int]$assigned_id,
@ -65,41 +65,48 @@ function Set-SnipeItAssetOwner()
[string]$apiKey [string]$apiKey
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($Values['expected_checkin']) {
$Values['expected_checkin'] = $values['expected_checkin'].ToString("yyyy-MM-dd")
}
if ($Values['checkout_at']) {
$Values['checkout_at'] = $values['checkout_at'].ToString("yyyy-MM-dd")
}
switch ($checkout_to_type)
{
'location' { $Values += @{ "assigned_location" = $assigned_id } }
'user' { $Values += @{ "assigned_user" = $assigned_id } }
'asset' { $Values += @{ "assigned_asset" = $assigned_id } }
}
#This can be removed now
if($Values.ContainsKey('assigned_id')){$Values.Remove('assigned_id')}
$Body = $Values | ConvertTo-Json;
if ($Values['expected_checkin']) {
$Values['expected_checkin'] = $values['expected_checkin'].ToString("yyyy-MM-dd")
} }
if ($Values['checkout_at']) { process{
$Values['checkout_at'] = $values['checkout_at'].ToString("yyyy-MM-dd") foreach($asset_id in $id){
$Parameters = @{
Uri = "$url/api/v1/hardware/$asset_id/checkout"
Method = 'POST'
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-SnipeitMethod @Parameters
}
return $result
}
} }
switch ($checkout_to_type)
{
'location' { $Values += @{ "assigned_location" = $assigned_id } }
'user' { $Values += @{ "assigned_user" = $assigned_id } }
'asset' { $Values += @{ "assigned_asset" = $assigned_id } }
}
#This can be removed now
if($Values.ContainsKey('assigned_id')){$Values.Remove('assigned_id')}
$Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/hardware/$id/checkout"
Method = 'POST'
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-SnipeitMethod @Parameters
}
return $result
} }

View file

@ -20,6 +20,9 @@ Quantity of the components you have
.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 order_number
Order number for the accessory
.PARAMETER purchase_date .PARAMETER purchase_date
Date accessory was purchased Date accessory was purchased
@ -58,6 +61,9 @@ function Set-SnipeItComponent()
[int]$location_id, [int]$location_id,
[string]$order_number,
[datetime]$purchase_date, [datetime]$purchase_date,
[float]$purchase_cost, [float]$purchase_cost,
@ -71,7 +77,7 @@ function Set-SnipeItComponent()
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
if ($values['purchase_date']) { if ($values['purchase_date']) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")

View file

@ -6,7 +6,7 @@
Updates licence on Snipe-It system Updates licence on Snipe-It system
.PARAMETER id .PARAMETER id
ID number of licence ID number of license or array of license IDs
.PARAMETER name .PARAMETER name
Name of license Name of license
@ -77,8 +77,8 @@ function Set-SnipeItLicense() {
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true, ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[ValidateLength(3, 255)] [ValidateLength(3, 255)]
[string]$name, [string]$name,
@ -107,6 +107,7 @@ function Set-SnipeItLicense() {
[string]$notes, [string]$notes,
[string]$order_number, [string]$order_number,
[float]$purchase_cost, [float]$purchase_cost,
@ -128,36 +129,39 @@ function Set-SnipeItLicense() {
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$apiKey [string]$apiKey
) )
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters if ($values['expiration_date']) {
$values['expiration_date'] = $values['expiration_date'].ToString("yyyy-MM-dd")
}
if ($values['expiration_date']) { if ($values['purchase_date']) {
$values['expiration_date'] = $values['expiration_date'].ToString("yyyy-MM-dd") $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd")
}
if ($values['termination_date']) {
$values['termination_date'] = $values['termination_date'].ToString("yyyy-MM-dd")
}
$Body = $Values | ConvertTo-Json;
} }
process {
foreach($license_id in $id){
$Parameters = @{
Uri = "$url/api/v1/licenses/$license_id"
Method = 'PUT'
Body = $Body
Token = $apiKey
}
if ($values['purchase_date']) { If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") $result = Invoke-SnipeitMethod @Parameters
}
$result
}
} }
if ($values['termination_date']) {
$values['termination_date'] = $values['termination_date'].ToString("yyyy-MM-dd")
}
$Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/licenses/$id"
Method = 'PUT'
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$result = Invoke-SnipeitMethod @Parameters
}
$result
} }

View file

@ -5,7 +5,7 @@
Checkout specific license seat to user, asset or both Checkout specific license seat to user, asset or both
.PARAMETER ID .PARAMETER ID
Unique ID For asset to checkout Unique ID For license to checkout or array of IDs
.PARAMETER assigned_to .PARAMETER assigned_to
Id of target user Id of target user
@ -40,7 +40,7 @@ function Set-SnipeItLicenseSeat()
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[int]$id, [int[]]$id,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[int]$seat_id, [int]$seat_id,
@ -58,21 +58,27 @@ function Set-SnipeItLicenseSeat()
[string]$apiKey [string]$apiKey
) )
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters begin{
$Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/licenses/$id/seats/$seat_id"
Method = 'Patch'
Body = $Body
Token = $apiKey
} }
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) process{
{ foreach($license_id in $id) {
$result = Invoke-SnipeitMethod @Parameters $Parameters = @{
} Uri = "$url/api/v1/licenses/$license_id/seats/$seat_id"
Method = 'Patch'
Body = $Body
Token = $apiKey
}
return $result If ($PSCmdlet.ShouldProcess("ShouldProcess?"))
{
$result = Invoke-SnipeitMethod @Parameters
}
return $result
}
}
} }

View file

@ -5,6 +5,9 @@
.DESCRIPTION .DESCRIPTION
Long description Long description
.PARAMETER id
ID number of location or array or IDs
.PARAMETER name .PARAMETER name
Name of Location Name of Location
@ -59,8 +62,8 @@ function Set-SnipeitLocation() {
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[ValidateLength(3, 255)] [ValidateLength(3, 255)]
[string]$name, [string]$name,
@ -92,23 +95,29 @@ function Set-SnipeitLocation() {
[string]$apiKey [string]$apiKey
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/locations/$id"
Method = 'PUT'
Body = $Body
Token = $apiKey
} }
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) { process{
$result = Invoke-SnipeitMethod @Parameters foreach ($location_id in $id) {
} $Parameters = @{
Uri = "$url/api/v1/locations/$location_id"
Method = 'PUT'
Body = $Body
Token = $apiKey
}
$result If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$result = Invoke-SnipeitMethod @Parameters
}
$result
}
}
} }

View file

@ -6,7 +6,7 @@
Updates Model on Snipe-it asset system Updates Model on Snipe-it asset system
.PARAMETER id .PARAMETER id
ID number of the Asset Model ID number of the Asset Model or array of IDs
.PARAMETER name .PARAMETER name
Name of the Asset Model Name of the Asset Model
@ -40,13 +40,12 @@ function Set-SnipeItModel() {
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[ValidateLength(1, 255)] [ValidateLength(1, 255)]
[string]$name, [string]$name,
[ValidateLength(1, 255)]
[string]$model_number, [string]$model_number,
[int]$category_id, [int]$category_id,
@ -66,22 +65,27 @@ function Set-SnipeItModel() {
[string]$apiKey [string]$apiKey
) )
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name begin {
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Body = $Values | ConvertTo-Json; $Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/models/$id"
Method = 'put'
Body = $Body
Token = $apiKey
} }
process {
foreach ($model_id in $id) {
$Parameters = @{
Uri = "$url/api/v1/models/$model_id"
Method = 'put'
Body = $Body
Token = $apiKey
}
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) { If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$result = Invoke-SnipeitMethod @Parameters $result = Invoke-SnipeitMethod @Parameters
}
$result
}
} }
$result
} }

View file

@ -2,6 +2,9 @@
.SYNOPSIS .SYNOPSIS
Creates a new user Creates a new user
.PARAMETER id
ID number of Snipe--It user or array of IDs
.DESCRIPTION .DESCRIPTION
Creates a new user to Snipe-IT system Creates a new user to Snipe-IT system
@ -68,8 +71,8 @@ function Set-SnipeItUser() {
)] )]
Param( Param(
[parameter(mandatory = $true)] [parameter(mandatory = $true,ValueFromPipelineByPropertyName)]
[int]$id, [int[]]$id,
[string]$first_name, [string]$first_name,
@ -77,10 +80,13 @@ function Set-SnipeItUser() {
[string]$userName, [string]$userName,
[string]$jobtitle, [string]$jobtitle,
[string]$email, [string]$email,
[string]$phone, [string]$phone,
[int]$company_id, [int]$company_id,
@ -91,10 +97,12 @@ function Set-SnipeItUser() {
[int]$manager_id, [int]$manager_id,
[string]$employee_num, [string]$employee_num,
[bool]$activated, [bool]$activated,
[string]$notes, [string]$notes,
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
@ -103,23 +111,28 @@ function Set-SnipeItUser() {
[parameter(mandatory = $true)] [parameter(mandatory = $true)]
[string]$apiKey [string]$apiKey
) )
begin{
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name
Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters
$Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters $Body = $Values | ConvertTo-Json;
$Body = $Values | ConvertTo-Json;
$Parameters = @{
Uri = "$url/api/v1/users/$id"
Method = 'PATCH'
Body = $Body
Token = $apiKey
} }
If ($PSCmdlet.ShouldProcess("ShouldProcess?")) { process{
$result = Invoke-SnipeitMethod @Parameters foreach($user_id in $id) {
} $Parameters = @{
Uri = "$url/api/v1/users/$user_id"
Method = 'PATCH'
Body = $Body
Token = $apiKey
}
$result If ($PSCmdlet.ShouldProcess("ShouldProcess?")) {
$result = Invoke-SnipeitMethod @Parameters
}
$result
}
}
} }

View file

@ -25,7 +25,7 @@ function Update-SnipeItAlias()
param( param(
[Parameter(Mandatory = $true, [Parameter(Mandatory = $true,
ValueFromPipeline = $true)] ValueFromPipeline = $true)]
[AllowEmptyString()]
[string[]] [string[]]
$String $String
) )

View file

@ -12,7 +12,7 @@
RootModule = 'SnipeItPS' RootModule = 'SnipeItPS'
# Version number of this module. # Version number of this module.
ModuleVersion = '1.4' ModuleVersion = '1.5'
# Supported PSEditions # Supported PSEditions
# CompatiblePSEditions = @() # CompatiblePSEditions = @()

View file

@ -14,7 +14,7 @@ environment:
PSGalleryAPIKey: PSGalleryAPIKey:
secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm
version: 1.4.{build} version: 1.5.{build}
# Don't rebuild when I tag a release on GitHub # Don't rebuild when I tag a release on GitHub
skip_tags: true skip_tags: true

View file

@ -12,10 +12,16 @@ Gets a list of Snipe-it Accessories
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItAccessory [[-search] <String>] [[-company_id] <Int32>] [[-category_id] <Int32>] Get-SnipeItAccessory [-search <String>] [-company_id <Int32>] [-category_id <Int32>] [-manufacturer_id <Int32>]
[[-manufacturer_id] <Int32>] [[-supplier_id] <Int32>] [[-sort] <String>] [[-order] <String>] [-supplier_id <Int32>] [-sort <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[[-limit] <Int32>] [[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get by ID
```
Get-SnipeItAccessory [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -40,7 +46,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -59,7 +65,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 11 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -70,11 +76,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -85,11 +91,26 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```
### -id
A id of specific Accessory
```yaml
Type: Int32
Parameter Sets: Get by ID
Aliases:
Required: False
Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -102,11 +123,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 8 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -117,11 +138,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -132,11 +153,11 @@ Result offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 9 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -147,11 +168,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -162,11 +183,11 @@ A text string to search the Accessory data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -177,11 +198,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 6 Position: Named
Default value: Created_at Default value: Created_at
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -192,11 +213,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -211,7 +232,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 10 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,12 +12,27 @@ Gets a list of Snipe-it Assets or specific asset
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItAsset [[-search] <String>] [[-id] <Int32>] [[-asset_tag] <String>] [[-asset_serial] <String>] Get-SnipeItAsset [-search <String>] [-order_number <String>] [-model_id <Int32>] [-category_id <Int32>]
[[-order_number] <Int32>] [[-model_id] <Int32>] [[-category_id] <Int32>] [[-manufacturer_id] <Int32>] [-manufacturer_id <Int32>] [-company_id <Int32>] [-location_id <Int32>] [-depreciation_id <Int32>]
[[-company_id] <Int32>] [[-location_id] <Int32>] [[-depreciation_id] <Int32>] [[-requestable] <Boolean>] [-requestable <Boolean>] [-status <String>] [-status_id <Int32>] [-sort <String>] [-order <String>]
[[-status] <String>] [[-status_id] <Int32>] [[-sort] <String>] [[-order] <String>] [[-limit] <Int32>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String> -apiKey <String> [<CommonParameters>]
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] ```
### Get with id
```
Get-SnipeItAsset [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with asset tag
```
Get-SnipeItAsset [-asset_tag <String>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with serial
```
Get-SnipeItAsset [-serial <String>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -52,7 +67,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -71,22 +86,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 20 Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -asset_serial
Exact asset serialnumber to query
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -97,11 +97,11 @@ Exact asset tag to query
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Get with asset tag
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -112,11 +112,11 @@ Optionally restrict asset results to this category ID
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -127,11 +127,11 @@ Optionally restrict asset results to this company ID
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 9 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -142,11 +142,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 11 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -157,11 +157,11 @@ ID number of excact snipeit asset
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with id
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -174,11 +174,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 17 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -189,11 +189,11 @@ Optionally restrict asset results to this location ID
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 10 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -204,11 +204,11 @@ Optionally restrict asset results to this manufacturer ID
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 8 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -219,11 +219,11 @@ Optionally restrict asset results to this asset model ID
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 6 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -234,11 +234,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 18 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -249,11 +249,11 @@ Specify the order (asc or desc) you wish to order by on your sort column
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 16 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -263,12 +263,12 @@ Accept wildcard characters: False
Optionally restrict asset results to this order number Optionally restrict asset results to this order number
```yaml ```yaml
Type: Int32 Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -279,11 +279,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Boolean Type: Boolean
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 12 Position: Named
Default value: False Default value: False
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -294,11 +294,26 @@ A text string to search the assets data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -serial
{{ Fill serial Description }}
```yaml
Type: String
Parameter Sets: Get with serial
Aliases: asset_serial
Required: False
Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -309,11 +324,11 @@ Specify the column name you wish to sort by
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 15 Position: Named
Default value: Created_at Default value: Created_at
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -324,11 +339,11 @@ Optionally restrict asset results to one of these status types: RTD, Deployed, U
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 13 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -339,11 +354,11 @@ Optionally restrict asset results to this status label ID
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 14 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -358,7 +373,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 19 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ Gets a list of Snipe-it Categories
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItCategory [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItCategory [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItCategory [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +45,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -58,7 +64,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -69,11 +75,11 @@ A id of specific Category
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -86,11 +92,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -101,11 +107,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -116,11 +122,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -131,11 +137,11 @@ A text string to search the Categories data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -150,7 +156,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ Gets a list of Snipe-it Companies
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItCompany [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItCompany [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItCompany [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -41,7 +47,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -60,7 +66,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -71,11 +77,11 @@ A id of specific Company
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -88,11 +94,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -103,11 +109,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -118,11 +124,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -133,11 +139,11 @@ A text string to search the Companies data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -152,7 +158,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,10 +12,16 @@ Gets a list of Snipe-it Components
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItComponent [[-search] <String>] [[-id] <Int32>] [[-category_id] <Int32>] [[-company_id] <Int32>] Get-SnipeItComponent [-search <String>] [-category_id <Int32>] [-company_id <Int32>] [-location_id <Int32>]
[[-location_id] <Int32>] [[-order] <String>] [[-sort] <String>] [[-limit] <Int32>] [[-offset] <Int32>] [-all] [-order <String>] [-sort <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String> -apiKey <String>
[-url] <String> [-apiKey] <String> [<CommonParameters>] [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItComponent [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -48,7 +54,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -67,7 +73,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 11 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -78,11 +84,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -93,11 +99,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -108,11 +114,11 @@ A id of specific Component
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -125,11 +131,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 8 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -140,11 +146,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -155,11 +161,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 9 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -170,11 +176,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 6 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -185,11 +191,11 @@ A text string to search the Components data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -200,11 +206,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: Named
Default value: Created_at Default value: Created_at
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -219,7 +225,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 10 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ Gets a list of Snipe-it Departments
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItDepartment [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItDepartment [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[[-offset] <Int32>] [-all] [[-sort] <String>] [-url] <String> [-apiKey] <String> [<CommonParameters>] [-sort <String>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItDepartment [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -44,7 +50,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -63,7 +69,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 8 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -74,11 +80,11 @@ A id of specific Department
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -91,11 +97,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -106,11 +112,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -121,11 +127,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -136,11 +142,11 @@ A text string to search the Departments data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -151,11 +157,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 6 Position: Named
Default value: Created_at Default value: Created_at
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -170,7 +176,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,12 +12,18 @@ Gets a list of Snipe-it Licenses
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItLicense [[-search] <String>] [[-id] <Int32>] [[-name] <String>] [[-company_id] <Int32>] Get-SnipeItLicense [-search <String>] [-name <String>] [-company_id <Int32>] [-product_key <String>]
[[-product_key] <String>] [[-order_number] <Int32>] [[-purchase_order] <String>] [[-license_name] <String>] [-order_number <String>] [-purchase_order <String>] [-license_name <String>] [-license_email <MailAddress>]
[[-license_email] <MailAddress>] [[-manufacturer_id] <Int32>] [[-supplier_id] <Int32>] [-manufacturer_id <Int32>] [-supplier_id <Int32>] [-depreciation_id <Int32>] [-category_id <Int32>]
[[-depreciation_id] <Int32>] [[-category_id] <Int32>] [[-order] <String>] [[-sort] <String>] [-order <String>] [-sort <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String> -apiKey <String>
[[-limit] <Int32>] [[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItLicense [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -42,7 +48,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -61,7 +67,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 19 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -72,11 +78,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 13 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -87,11 +93,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -102,11 +108,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 12 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -117,11 +123,11 @@ A id of specific License
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -132,11 +138,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: MailAddress Type: MailAddress
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 9 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -147,11 +153,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 8 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -164,11 +170,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 16 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -179,11 +185,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 10 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -194,11 +200,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -209,11 +215,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 17 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -224,11 +230,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 14 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -238,12 +244,12 @@ Accept wildcard characters: False
{{ Fill order_number Description }} {{ Fill order_number Description }}
```yaml ```yaml
Type: Int32 Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 6 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -254,11 +260,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -269,11 +275,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -284,11 +290,11 @@ A text string to search the Licenses data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -299,11 +305,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 15 Position: Named
Default value: Created_at Default value: Created_at
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -314,11 +320,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 11 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -333,7 +339,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 18 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ schema: 2.0.0
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItManufacturer [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItManufacturer [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItManufacturer [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -41,7 +47,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -60,7 +66,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -71,11 +77,11 @@ A id of specific Manufactuter
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -88,11 +94,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -103,11 +109,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -118,11 +124,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -133,11 +139,11 @@ A text string to search the Manufactures data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -152,7 +158,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ Gets a list of Snipe-it Models
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItModel [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItModel [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItModel [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +45,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -58,7 +64,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -69,11 +75,11 @@ A id of specific model
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -86,11 +92,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -101,11 +107,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -116,11 +122,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -131,11 +137,11 @@ A text string to search the Models data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -150,7 +156,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ Gets a list of Snipe-it Status Labels
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItStatus [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItStatus [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all] -url <String>
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItStatus [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +45,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -58,7 +64,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -69,11 +75,11 @@ A id of specific Status Label
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -86,11 +92,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -101,11 +107,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -116,11 +122,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -131,11 +137,11 @@ A text string to search the Status Labels data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -150,7 +156,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ schema: 2.0.0
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItSupplier [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeItSupplier [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeItSupplier [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +45,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -58,7 +64,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -69,11 +75,11 @@ A id of specific Suplier
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -86,11 +92,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -101,11 +107,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -116,11 +122,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -131,11 +137,11 @@ A text string to search the Supliers data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -150,7 +156,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,11 +12,16 @@ schema: 2.0.0
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeItUser [[-search] <String>] [[-id] <String>] [[-company_id] <Int32>] [[-location_id] <Int32>] Get-SnipeItUser [-search <String>] [-company_id <Int32>] [-location_id <Int32>] [-group_id <Int32>]
[[-group_id] <Int32>] [[-department_id] <Int32>] [[-username] <String>] [[-email] <String>] [-department_id <Int32>] [-username <String>] [-email <String>] [-order <String>] [-limit <Int32>]
[[-order] <String>] [[-limit] <Int32>] [[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [-offset <Int32>] [-all] -url <String> -apiKey <String> [<CommonParameters>]
[<CommonParameters>] ```
### Get with ID
```
Get-SnipeItUser [-id <String>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -51,7 +56,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -70,7 +75,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 13 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -81,11 +86,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -96,11 +101,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 6 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -111,11 +116,11 @@ Search string for email field
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 8 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -126,11 +131,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -141,11 +146,11 @@ A id of specific User
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -158,11 +163,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 10 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -173,11 +178,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -188,11 +193,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 11 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -203,11 +208,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 9 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -218,11 +223,11 @@ A text string to search the User data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -237,7 +242,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 12 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -248,11 +253,11 @@ Search string for username field
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False

View file

@ -12,9 +12,15 @@ Gets a list of Snipe-it Locations
## SYNTAX ## SYNTAX
### Search
``` ```
Get-SnipeitLocation [[-search] <String>] [[-id] <Int32>] [[-order] <String>] [[-limit] <Int32>] Get-SnipeitLocation [-search <String>] [-order <String>] [-limit <Int32>] [-offset <Int32>] [-all]
[[-offset] <Int32>] [-all] [-url] <String> [-apiKey] <String> [<CommonParameters>] -url <String> -apiKey <String> [<CommonParameters>]
```
### Get with ID
```
Get-SnipeitLocation [-id <Int32>] -url <String> -apiKey <String> [<CommonParameters>]
``` ```
## DESCRIPTION ## DESCRIPTION
@ -39,7 +45,7 @@ A return all results, works with -offset and other parameters
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
@ -58,7 +64,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 7 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -69,11 +75,11 @@ A id of specific Location
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Get with ID
Aliases: Aliases:
Required: False Required: False
Position: 2 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -86,11 +92,11 @@ Defines batch size for -all
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 4 Position: Named
Default value: 50 Default value: 50
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -101,11 +107,11 @@ Offset to use
```yaml ```yaml
Type: Int32 Type: Int32
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 5 Position: Named
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -116,11 +122,11 @@ Accept wildcard characters: False
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 3 Position: Named
Default value: Desc Default value: Desc
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -131,11 +137,11 @@ A text string to search the Locations data
```yaml ```yaml
Type: String Type: String
Parameter Sets: (All) Parameter Sets: Search
Aliases: Aliases:
Required: False Required: False
Position: 1 Position: Named
Default value: None Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -150,7 +156,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 6 Position: Named
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 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>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>] [-url] <String> [[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>]
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-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,21 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -order_number
Order number of the component
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -purchase_cost ### -purchase_cost
Cost of item being purchased. Cost of item being purchased.
@ -114,7 +129,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: 8
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -129,7 +144,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: False Required: False
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
@ -159,7 +174,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,7 +13,7 @@ Updates accessory on Snipe-It system
## SYNTAX ## SYNTAX
``` ```
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>] [[-order_number] <String>] [[-purchase_cost] <Single>] [[-company_id] <Int32>] [[-manufacturer_id] <Int32>] [[-order_number] <String>] [[-purchase_cost] <Single>]
[[-purchase_date] <DateTime>] [[-min_qty] <Boolean>] [[-supplier_id] <Int32>] [-url] <String> [[-purchase_date] <DateTime>] [[-min_qty] <Boolean>] [[-supplier_id] <Int32>] [-url] <String>
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
@ -80,14 +80,14 @@ Accept wildcard characters: False
{{ Fill id Description }} {{ Fill id Description }}
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -13,7 +13,7 @@ Checkout accessory
## SYNTAX ## SYNTAX
``` ```
Set-SnipeItAccessoryOwner [-id] <Int32> [-assigned_to] <Int32> [[-note] <String>] [-url] <String> Set-SnipeItAccessoryOwner [-id] <Int32[]> [-assigned_to] <Int32> [[-note] <String>] [-url] <String>
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
@ -63,14 +63,14 @@ Accept wildcard characters: False
Unique ID For accessory to checkout Unique ID For accessory to checkout
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -13,7 +13,7 @@ Update a specific Asset in the Snipe-it asset system
## SYNTAX ## SYNTAX
``` ```
Set-SnipeItAsset [-id] <Int32> [[-name] <String>] [[-status_id] <Int32>] [[-model_id] <Int32>] Set-SnipeItAsset [-id] <Int32[]> [[-name] <String>] [[-status_id] <Int32>] [[-model_id] <Int32>]
[[-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>]
@ -118,14 +118,14 @@ Accept wildcard characters: False
ID of the Asset ID of the Asset
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -13,7 +13,7 @@ Checkout asset
## SYNTAX ## SYNTAX
``` ```
Set-SnipeItAssetOwner [-id] <Int32> [-assigned_id] <Int32> [[-checkout_to_type] <String>] [[-name] <String>] Set-SnipeItAssetOwner [-id] <Int32[]> [-assigned_id] <Int32> [[-checkout_to_type] <String>] [[-name] <String>]
[[-note] <String>] [[-expected_checkin] <DateTime>] [[-checkout_at] <DateTime>] [-url] <String> [[-note] <String>] [[-expected_checkin] <DateTime>] [[-checkout_at] <DateTime>] [-url] <String>
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
@ -109,14 +109,14 @@ Accept wildcard characters: False
Unique ID For asset to checkout Unique ID For asset to checkout
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -14,8 +14,8 @@ Updates component
``` ```
Set-SnipeItComponent [-id] <Int32> [-qty] <Int32> [[-name] <String>] [[-company_id] <Int32>] Set-SnipeItComponent [-id] <Int32> [-qty] <Int32> [[-name] <String>] [[-company_id] <Int32>]
[[-location_id] <Int32>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>] [-url] <String> [[-location_id] <Int32>] [[-order_number] <String>] [[-purchase_date] <DateTime>] [[-purchase_cost] <Single>]
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-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,21 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -order_number
Order number for the accessory
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -purchase_cost ### -purchase_cost
Cost of item being purchased. Cost of item being purchased.
@ -114,7 +129,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: False Required: False
Position: 7 Position: 8
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
@ -129,7 +144,7 @@ Parameter Sets: (All)
Aliases: Aliases:
Required: False Required: False
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
@ -159,7 +174,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,7 +13,7 @@ Updates a licence
## SYNTAX ## SYNTAX
``` ```
Set-SnipeItLicense [-id] <Int32> [[-name] <String>] [[-seats] <Int32>] [[-category_id] <Int32>] Set-SnipeItLicense [-id] <Int32[]> [[-name] <String>] [[-seats] <Int32>] [[-category_id] <Int32>]
[[-company_id] <Int32>] [[-expiration_date] <DateTime>] [[-license_email] <MailAddress>] [[-company_id] <Int32>] [[-expiration_date] <DateTime>] [[-license_email] <MailAddress>]
[[-license_name] <String>] [[-maintained] <Boolean>] [[-manufacturer_id] <Int32>] [[-notes] <String>] [[-license_name] <String>] [[-maintained] <Boolean>] [[-manufacturer_id] <Int32>] [[-notes] <String>]
[[-order_number] <String>] [[-purchase_cost] <Single>] [[-purchase_date] <DateTime>] [[-order_number] <String>] [[-purchase_cost] <Single>] [[-purchase_date] <DateTime>]
@ -97,14 +97,14 @@ Accept wildcard characters: False
ID number of licence ID number of licence
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -13,7 +13,7 @@ Set license seat or checkout license seat
## SYNTAX ## SYNTAX
``` ```
Set-SnipeItLicenseSeat [-id] <Int32> [-seat_id] <Int32> [[-assigned_id] <Int32>] [[-asset_id] <Int32>] Set-SnipeItLicenseSeat [-id] <Int32[]> [-seat_id] <Int32> [[-assigned_id] <Int32>] [[-asset_id] <Int32>]
[[-note] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [[-note] <String>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
@ -85,7 +85,7 @@ Accept wildcard characters: False
Unique ID For asset to checkout Unique ID For asset to checkout
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:

View file

@ -13,7 +13,7 @@ Updates Model on Snipe-it asset system
## SYNTAX ## SYNTAX
``` ```
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>] [-url] <String>
[-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>] [-apiKey] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
``` ```
@ -94,14 +94,14 @@ Accept wildcard characters: False
ID number of the Asset Model ID number of the Asset Model
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -13,7 +13,7 @@ Creates a new user
## SYNTAX ## SYNTAX
``` ```
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>] [[-company_id] <Int32>] [[-jobtitle] <String>] [[-email] <String>] [[-phone] <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>] [-url] <String> [-apiKey] <String> [-WhatIf] [-Confirm]
@ -142,14 +142,14 @@ Accept wildcard characters: False
{{ Fill id Description }} {{ Fill id Description }}
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```

View file

@ -13,7 +13,7 @@ Updates Location in Snipe-it asset system
## SYNTAX ## SYNTAX
``` ```
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>] [-url] <String> [-apiKey] <String>
[-WhatIf] [-Confirm] [<CommonParameters>] [-WhatIf] [-Confirm] [<CommonParameters>]
@ -125,14 +125,14 @@ Accept wildcard characters: False
{{ Fill id Description }} {{ Fill id Description }}
```yaml ```yaml
Type: Int32 Type: Int32[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: True
Position: 1 Position: 1
Default value: 0 Default value: 0
Accept pipeline input: False Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False Accept wildcard characters: False
``` ```