diff --git a/CHANGELOG.md b/CHANGELOG.md index 91fc4d9..b27a3c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/), and this project adheres to [Semantic Versioning](http://semver.org/). + +# [v.1.8.x] - 2021-06-17 + +## Support for new Snipe it endpoints + +## New features + +Get-SnipeitAccessories -user_id +returns accessories checked out to user id + +Get-SnipeitAsset -user_id +Return Assets checked out to user id + +Get-SnipeitAsset -component_id +Returns assets with specific component id + +Get-SnipeitLicense -user_id +Get licenses checked out to user ID + +Get-SnipeitLicense -asset_id +Get licenses checked out to asset ID + +Get-SnipeitUser -accessory_id +Get users that have specific accessory id checked out + # [v.1.7.x] - 2021-06-14 ## Consumables diff --git a/SnipeitPS/Public/Get-SnipeitAccessory.ps1 b/SnipeitPS/Public/Get-SnipeitAccessory.ps1 index 88d6429..1a84a71 100644 --- a/SnipeitPS/Public/Get-SnipeitAccessory.ps1 +++ b/SnipeitPS/Public/Get-SnipeitAccessory.ps1 @@ -32,6 +32,10 @@ Get-SnipeitAccessory -search Keyboard .EXAMPLE Get-SnipeitAccessory -id 1 +.EXAMPLE +Get-SnipeitAccessory -user_id 1 +Get accessories checked out to user ID 1 + #> function Get-SnipeitAccessory() { @@ -43,6 +47,9 @@ function Get-SnipeitAccessory() { [parameter(ParameterSetName='Get by ID')] [int]$id, + [parameter(ParameterSetName='Accessories checked out to user id')] + [int]$user_id, + [parameter(ParameterSetName='Search')] [int]$company_id, @@ -69,6 +76,7 @@ function Get-SnipeitAccessory() { [int]$offset, [parameter(ParameterSetName='Search')] + [parameter(ParameterSetName='Accessories checked out to user id')] [switch]$all = $false, [parameter(mandatory = $true)] @@ -79,23 +87,21 @@ function Get-SnipeitAccessory() { ) Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name - if ($id -and $search){ - throw "Please specify only one of -id or -search parameter" + switch($PsCmdlet.ParameterSetName) { + 'Search' {$apiurl = "$url/api/v1/accessories"} + 'Get by ID' {$apiurl= "$url/api/v1/accessories/$id"} + 'Accessories checked out to user id' {$apiurl = "$url/api/v1/users/$user_id/accessories"} } $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters $Parameters = @{ - Uri = "$url/api/v1/accessories" + Uri = $apiurl Method = 'Get' GetParameters = $SearchParameter Token = $apiKey } - if($id){ - $Parameters.Uri ="$url/api/v1/accessories/$id" - } - if ($all) { $offstart = $(if($offset){$offset} Else {0}) $callargs = $SearchParameter diff --git a/SnipeitPS/Public/Get-SnipeitAsset.ps1 b/SnipeitPS/Public/Get-SnipeitAsset.ps1 index 6f1e989..fe3c8f6 100644 --- a/SnipeitPS/Public/Get-SnipeitAsset.ps1 +++ b/SnipeitPS/Public/Get-SnipeitAsset.ps1 @@ -66,16 +66,42 @@ URL of Snipeit system, can be set using Set-SnipeitInfo command Users API Key for Snipeit, can be set using Set-SnipeitInfo command .EXAMPLE -Get-SnipeitAsset -url "https://assets.example.com"-token "token..." +Get-SnipeitAsset -all -url "https://assets.example.com"-token "token..." +Returens all assets .EXAMPLE -Get-SnipeitAsset -search "myMachine"-url "https://assets.example.com"-token "token..." +Get-SnipeitAsset -search "myMachine" +Search for specific asset .EXAMPLE -Get-SnipeitAsset -search "myMachine"-url "https://assets.example.com"-token "token..." +Get-SnipeitAsset -id 3 +Get asset with id number 3 .EXAMPLE -Get-SnipeitAsset -asset_tag "myAssetTag"-url "https://assets.example.com"-token "token..." +Get-SnipeitAsset -asset_tag snipe0003 +Get asset with asset tag snipe00033 + +.EXAMPLE +Get-SnipeitAsset -serial 1234 +Get asset with searial number 1234 + +.EXAMPLE +Get-SnipeitAsser -audit_due +Get Assets due auditing soon + +.EXAMPLE +Get-SnipeitAsser -audit_overdue +Get Assets overdue for auditing + +.EXAMPLE +Get-AnipeitAsset -user_id 4 +Get Assets checked out to user id 4 + +.EXAMPLE +Get-SnipeitAsset -component_id 5 +Get Assets with component id 5 + + #> function Get-SnipeitAsset() { @@ -100,6 +126,12 @@ function Get-SnipeitAsset() { [parameter(ParameterSetName='Assets overdue for auditing')] [switch]$audit_overdue, + [parameter(ParameterSetName='Assets checked out to user id')] + [int]$user_id, + + [parameter(ParameterSetName='Assets with component id')] + [int]$component_id, + [parameter(ParameterSetName='Search')] [string]$order_number, @@ -133,28 +165,38 @@ function Get-SnipeitAsset() { [parameter(ParameterSetName='Search')] [parameter(ParameterSetName='Assets due auditing soon')] [parameter(ParameterSetName='Assets overdue for auditing')] + [parameter(ParameterSetName='Assets checked out to user id')] + [parameter(ParameterSetName='Assets with component id')] [ValidateSet('id','created_at','asset_tag','serial','order_number','model_id','category_id','manufacturer_id','company_id','location_id','status','status_id')] [string]$sort, [parameter(ParameterSetName='Search')] [parameter(ParameterSetName='Assets due auditing soon')] [parameter(ParameterSetName='Assets overdue for auditing')] + [parameter(ParameterSetName='Assets checked out to user id')] + [parameter(ParameterSetName='Assets with component id')] [ValidateSet("asc", "desc")] [string]$order, [parameter(ParameterSetName='Search')] [parameter(ParameterSetName='Assets due auditing soon')] [parameter(ParameterSetName='Assets overdue for auditing')] + [parameter(ParameterSetName='Assets checked out to user id')] + [parameter(ParameterSetName='Assets with component id')] [int]$limit = 50, [parameter(ParameterSetName='Search')] [parameter(ParameterSetName='Assets due auditing soon')] [parameter(ParameterSetName='Assets overdue for auditing')] + [parameter(ParameterSetName='Assets checked out to user id')] + [parameter(ParameterSetName='Assets with component id')] [int]$offset, [parameter(ParameterSetName='Search')] [parameter(ParameterSetName='Assets due auditing soon')] [parameter(ParameterSetName='Assets overdue for auditing')] + [parameter(ParameterSetName='Assets checked out to user id')] + [parameter(ParameterSetName='Assets with component id')] [switch]$all = $false, [parameter(mandatory = $true)] @@ -175,6 +217,8 @@ function Get-SnipeitAsset() { 'Get with serial' { $apiurl= "$url/api/v1/hardware/byserial/$serial"} 'Assets due auditing soon' {$apiurl = "$url/api/v1/hardware/audit/due"} 'Assets overdue for auditing' {$apiurl = "$url/api/v1/hardware/audit/overdue"} + 'Assets checked out to user id'{$apiurl = "$url/api/v1/users/$user_id/assets"} + 'Assets with component id' {$apiurl = "$url/api/v1/components/$component_id/assets"} } diff --git a/SnipeitPS/Public/Get-SnipeitLicense.ps1 b/SnipeitPS/Public/Get-SnipeitLicense.ps1 index 90a9b31..ba4a4d9 100644 --- a/SnipeitPS/Public/Get-SnipeitLicense.ps1 +++ b/SnipeitPS/Public/Get-SnipeitLicense.ps1 @@ -41,6 +41,12 @@ function Get-SnipeitLicense() { [parameter(ParameterSetName='Get with ID')] [int]$id, + [parameter(ParameterSetName='Get licenses checked out to user ID')] + [int]$user_id, + + [parameter(ParameterSetName='Get licenses checked out to asset ID')] + [int]$asset_id, + [parameter(ParameterSetName='Search')] [string]$name, @@ -87,7 +93,8 @@ function Get-SnipeitLicense() { [parameter(ParameterSetName='Search')] [int]$offset, - + [parameter(ParameterSetName='Get licenses checked out to user ID')] + [parameter(ParameterSetName='Get licenses checked out to asset ID')] [parameter(ParameterSetName='Search')] [switch]$all = $false, @@ -102,14 +109,11 @@ function Get-SnipeitLicense() { $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters - $apiurl = "$url/api/v1/licenses" - - if ($search -and $id ) { - Throw "[$($MyInvocation.MyCommand.Name)] Please specify only -search or -id parameter , not both " - } - - if ($id) { - $apiurl= "$url/api/v1/licenses/$id" + switch($PsCmdlet.ParameterSetName) { + 'Search' {$apiurl = "$url/api/v1/licenses"} + 'Get with ID' {$apiurl= "$url/api/v1/licenses/$id"} + 'Get licenses checked out to user ID' {$apiurl= "$url/api/v1/users/$user_id/licenses"} + 'Get licenses checked out to asset ID' {$apiurl= "$url/api/v1/hardware/$asset_id/licenses"} } $Parameters = @{ diff --git a/SnipeitPS/Public/Get-SnipeitUser.ps1 b/SnipeitPS/Public/Get-SnipeitUser.ps1 index 61e6e37..2d3381e 100644 --- a/SnipeitPS/Public/Get-SnipeitUser.ps1 +++ b/SnipeitPS/Public/Get-SnipeitUser.ps1 @@ -40,6 +40,10 @@ Get-SnipeitUser -username someuser .EXAMPLE Get-SnipeitUser -email user@somedomain.com + +.EXAMPLE +Get-SnipeitUser -accessory_id 3 +Get users with accessory id 3 has been checked out to #> function Get-SnipeitUser() { @@ -51,6 +55,9 @@ function Get-SnipeitUser() { [parameter(ParameterSetName='Get with ID')] [string]$id, + [parameter(ParameterSetName='Get users a specific accessory id has been checked out to')] + [string]$accessory_id, + [parameter(ParameterSetName='Search')] [int]$company_id, @@ -80,6 +87,7 @@ function Get-SnipeitUser() { [int]$offset, [parameter(ParameterSetName='Search')] + [parameter(ParameterSetName='Get users a specific accessory id has been checked out to')] [switch]$all = $false, [parameter(mandatory = $true)] @@ -92,16 +100,12 @@ function Get-SnipeitUser() { Test-SnipeitAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $SearchParameter = . Get-ParameterValue -Parameters $MyInvocation.MyCommand.Parameters -BoundParameters $PSBoundParameters - - $apiurl = "$url/api/v1/users" - - if ($search -and $id ) { - Throw "[$($MyInvocation.MyCommand.Name)] Please specify only -search or -id parameter , not both " + switch ($PsCmdlet.ParameterSetName) { + 'Search' { $apiurl = "$url/api/v1/users"} + 'Get with id' {$apiurl= "$url/api/v1/users/$id"} + 'Get users a specific accessory id has been checked out to' {$apiurl= "$url/api/v1/accessories/$accessory_id/checkedout"} } - if ($id) { - $apiurl= "$url/api/v1/users/$id" - } $Parameters = @{ Uri = $apiurl Method = 'Get' diff --git a/SnipeitPS/Public/New-SnipeitAccessory.ps1 b/SnipeitPS/Public/New-SnipeitAccessory.ps1 index df4663c..6b97a92 100644 --- a/SnipeitPS/Public/New-SnipeitAccessory.ps1 +++ b/SnipeitPS/Public/New-SnipeitAccessory.ps1 @@ -23,6 +23,9 @@ ID Number of the company the accessory is assigned to .PARAMETER manufacturer_id ID number of the manufacturer for this accessory. +.PARAMETER model_number +Model number for this accessory + .PARAMETER order_number Order number for this accessory. @@ -47,7 +50,7 @@ ID number of the supplier for this accessory .PARAMETER location_id ID number of the location the accessory is assigned to -.PARAMETER min_qty +.PARAMETER min_amt Min quantity of the accessory before alert is triggered .PARAMETER url @@ -86,11 +89,13 @@ function New-SnipeitAccessory() { [string]$order_number, + [string]$model_number, + [float]$purchase_cost, [datetime]$purchase_date, - [int]$min_qty, + [int]$min_amt, [ValidateRange(1, [int]::MaxValue)] [int]$supplier_id, diff --git a/SnipeitPS/Public/Set-SnipeitAccessory.ps1 b/SnipeitPS/Public/Set-SnipeitAccessory.ps1 index 430176c..6fd29a9 100644 --- a/SnipeitPS/Public/Set-SnipeitAccessory.ps1 +++ b/SnipeitPS/Public/Set-SnipeitAccessory.ps1 @@ -26,6 +26,9 @@ ID Number of the company the accessory is assigned to .PARAMETER manufacturer_id ID number of the manufacturer for this accessory. +.PARAMETER model_number +Model number for this accessory + .PARAMETER order_number Order number for this accessory. @@ -85,6 +88,7 @@ function Set-SnipeitAccessory() { [Nullable[System.Int32]]$manufacturer_id, + [string]$model_number, [string]$order_number, @@ -120,7 +124,7 @@ function Set-SnipeitAccessory() { foreach($accessory_id in $id){ $Parameters = @{ Uri = "$url/api/v1/accessories/$accessory_id" - Method = 'Patch' + Method = 'Put' Body = $Body Token = $apiKey } diff --git a/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 b/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 index 9dedbae..a5dcbbf 100644 --- a/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 +++ b/SnipeitPS/Public/Set-SnipeitLicenseSeat.ps1 @@ -23,13 +23,17 @@ User's API Key for Snipeit, can be set using Set-SnipeitInfo command .EXAMPLE - Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -assigned_id 3 -Verbose + Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -assigned_id 3 Checkout licence to user id 3 .EXAMPLE - Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id 3 -Verbose + Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id 3 Checkout licence to asset id 3 + .EXAMPLE + Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id $null -assigned_id $null + Checkin licence seat id 1 of licence id 1 + #> function Set-SnipeitLicenseSeat() { diff --git a/SnipeitPS/SnipeitPS.psd1 b/SnipeitPS/SnipeitPS.psd1 index f5c1113..dbbb9ef 100644 --- a/SnipeitPS/SnipeitPS.psd1 +++ b/SnipeitPS/SnipeitPS.psd1 @@ -12,7 +12,7 @@ RootModule = 'SnipeitPS' # Version number of this module. -ModuleVersion = '1.7' +ModuleVersion = '1.8' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/appveyor.yml b/appveyor.yml index 0fb5249..a316978 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,7 @@ environment: secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm PShell: '5' -version: 1.7.{build} +version: 1.8.{build} # Don't rebuild when I tag a release on GitHub skip_tags: true diff --git a/docs/Get-SnipeitAccessory.md b/docs/Get-SnipeitAccessory.md index 366aecc..680c5a1 100644 --- a/docs/Get-SnipeitAccessory.md +++ b/docs/Get-SnipeitAccessory.md @@ -24,6 +24,11 @@ Get-SnipeitAccessory [-search ] [-company_id ] [-category_id ] -url -apiKey [] ``` +### Accessories checked out to user id +``` +Get-SnipeitAccessory [-user_id ] [-all] -url -apiKey [] +``` + ## DESCRIPTION Gets a list of Snipe-it Accessories @@ -39,6 +44,12 @@ Get-SnipeitAccessory -search Keyboard Get-SnipeitAccessory -id 1 ``` +### EXAMPLE 3 +``` +Get-SnipeitAccessory -user_id 1 +Get accessories checked out to user ID 1 +``` + ## PARAMETERS ### -all @@ -46,7 +57,7 @@ A return all results, works with -offset and other parameters ```yaml Type: SwitchParameter -Parameter Sets: Search +Parameter Sets: Search, Accessories checked out to user id Aliases: Required: False @@ -238,6 +249,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -user_id +{{ Fill user_id Description }} + +```yaml +Type: Int32 +Parameter Sets: Accessories checked out to user id +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Get-SnipeitAsset.md b/docs/Get-SnipeitAsset.md index 66e3724..db43ac2 100644 --- a/docs/Get-SnipeitAsset.md +++ b/docs/Get-SnipeitAsset.md @@ -47,6 +47,18 @@ Get-SnipeitAsset [-audit_overdue] [-sort ] [-order ] [-limit -apiKey [] ``` +### Assets checked out to user id +``` +Get-SnipeitAsset [-user_id ] [-sort ] [-order ] [-limit ] [-offset ] + [-all] -url -apiKey [] +``` + +### Assets with component id +``` +Get-SnipeitAsset [-component_id ] [-sort ] [-order ] [-limit ] [-offset ] + [-all] -url -apiKey [] +``` + ## DESCRIPTION {{ Fill in the Description }} @@ -54,22 +66,56 @@ Get-SnipeitAsset [-audit_overdue] [-sort ] [-order ] [-limit ] [-name ] [-company_id ] [-p Get-SnipeitLicense [-id ] -url -apiKey [] ``` +### Get licenses checked out to user ID +``` +Get-SnipeitLicense [-user_id ] [-all] -url -apiKey [] +``` + +### Get licenses checked out to asset ID +``` +Get-SnipeitLicense [-asset_id ] [-all] -url -apiKey [] +``` + ## DESCRIPTION {{ Fill in the Description }} @@ -48,7 +58,7 @@ A return all results, works with -offset and other parameters ```yaml Type: SwitchParameter -Parameter Sets: Search +Parameter Sets: Search, Get licenses checked out to user ID, Get licenses checked out to asset ID Aliases: Required: False @@ -73,6 +83,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -asset_id +{{ Fill asset_id Description }} + +```yaml +Type: Int32 +Parameter Sets: Get licenses checked out to asset ID +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -category_id {{ Fill category_id Description }} @@ -345,6 +370,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -user_id +{{ Fill user_id Description }} + +```yaml +Type: Int32 +Parameter Sets: Get licenses checked out to user ID +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/docs/Get-SnipeitUser.md b/docs/Get-SnipeitUser.md index eecb667..05e6766 100644 --- a/docs/Get-SnipeitUser.md +++ b/docs/Get-SnipeitUser.md @@ -24,6 +24,11 @@ Get-SnipeitUser [-search ] [-company_id ] [-location_id ] Get-SnipeitUser [-id ] -url -apiKey [] ``` +### Get users a specific accessory id has been checked out to +``` +Get-SnipeitUser [-accessory_id ] [-all] -url -apiKey [] +``` + ## DESCRIPTION {{ Fill in the Description }} @@ -49,14 +54,35 @@ Get-SnipeitUser -username someuser Get-SnipeitUser -email user@somedomain.com ``` +### EXAMPLE 5 +``` +Get-SnipeitUser -accessory_id 3 +Get users with accessory id 3 has been checked out to +``` + ## PARAMETERS +### -accessory_id +{{ Fill accessory_id Description }} + +```yaml +Type: String +Parameter Sets: Get users a specific accessory id has been checked out to +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -all A return all results, works with -offset and other parameters ```yaml Type: SwitchParameter -Parameter Sets: Search +Parameter Sets: Search, Get users a specific accessory id has been checked out to Aliases: Required: False diff --git a/docs/New-SnipeitAccessory.md b/docs/New-SnipeitAccessory.md index a9e27c1..de15744 100644 --- a/docs/New-SnipeitAccessory.md +++ b/docs/New-SnipeitAccessory.md @@ -14,8 +14,8 @@ Creates new accessory on Snipe-It system ``` New-SnipeitAccessory [-name] [-qty] [-category_id] [[-company_id] ] - [[-manufacturer_id] ] [[-order_number] ] [[-purchase_cost] ] - [[-purchase_date] ] [[-min_qty] ] [[-supplier_id] ] [[-location_id] ] + [[-manufacturer_id] ] [[-order_number] ] [[-model_number] ] [[-purchase_cost] ] + [[-purchase_date] ] [[-min_amt] ] [[-supplier_id] ] [[-location_id] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` @@ -40,7 +40,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 13 +Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -85,7 +85,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 11 +Position: 12 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -106,7 +106,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -min_qty +### -min_amt Min quantity of the accessory before alert is triggered ```yaml @@ -115,12 +115,27 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 10 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` +### -model_number +Model number for this accessory + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -name Accessory name @@ -160,7 +175,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 8 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -175,7 +190,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -205,7 +220,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 10 +Position: 11 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -220,7 +235,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 12 +Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Set-SnipeitAccessory.md b/docs/Set-SnipeitAccessory.md index 1f9ad25..9adeae2 100644 --- a/docs/Set-SnipeitAccessory.md +++ b/docs/Set-SnipeitAccessory.md @@ -14,9 +14,9 @@ Updates accessory on Snipe-It system ``` Set-SnipeitAccessory [-id] [[-name] ] [[-qty] ] [[-category_id] ] - [[-company_id] ] [[-manufacturer_id] ] [[-order_number] ] [[-purchase_cost] ] - [[-purchase_date] ] [[-min_amt] ] [[-supplier_id] ] [-url] [-apiKey] - [-WhatIf] [-Confirm] [] + [[-company_id] ] [[-manufacturer_id] ] [[-model_number] ] [[-order_number] ] + [[-purchase_cost] ] [[-purchase_date] ] [[-min_amt] ] [[-supplier_id] ] + [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -40,7 +40,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 13 +Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -115,7 +115,22 @@ Parameter Sets: (All) Aliases: Required: False -Position: 10 +Position: 11 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -model_number +Model number for this accessory + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -145,7 +160,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -160,7 +175,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 9 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -175,7 +190,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -205,7 +220,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 11 +Position: 12 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -220,7 +235,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 12 +Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Set-SnipeitLicenseSeat.md b/docs/Set-SnipeitLicenseSeat.md index e10f09f..7f53a74 100644 --- a/docs/Set-SnipeitLicenseSeat.md +++ b/docs/Set-SnipeitLicenseSeat.md @@ -24,16 +24,22 @@ Checkout specific license seat to user, asset or both ### EXAMPLE 1 ``` -Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -assigned_id 3 -Verbose +Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -assigned_id 3 Checkout licence to user id 3 ``` ### EXAMPLE 2 ``` -Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id 3 -Verbose +Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id 3 Checkout licence to asset id 3 ``` +### EXAMPLE 3 +``` +Set-SnipeitLicenceSeat -ID 1 -seat_id 1 -asset_id $null -assigned_id $null +Checkin licence seat id 1 of licence id 1 +``` + ## PARAMETERS ### -apiKey