From f12e1346dbdc89215776d32a43aca2895c7f1331 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Tue, 25 May 2021 06:12:34 +0300 Subject: [PATCH 1/9] Get-SnipeItAlias provides this now --- SnipeitPS/SnipeItPS.psm1 | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/SnipeitPS/SnipeItPS.psm1 b/SnipeitPS/SnipeItPS.psm1 index e85ba63..783e814 100644 --- a/SnipeitPS/SnipeItPS.psm1 +++ b/SnipeitPS/SnipeItPS.psm1 @@ -14,43 +14,5 @@ Get-ChildItem $scriptRoot *.ps1 | ForEach-Object { Import-Module $_.FullName } - -$SnipeItAliases= @{'Get-Asset' = 'Get-SnipeItAsset'; - 'Get-AssetMaintenance' = 'Get-SnipeItAssetMaintenance'; - 'Get-Category' = 'Get-SnipeItCategory'; - 'Get-Company' = 'Get-SnipeItCompany'; - 'Get-Component' = 'Get-SnipeItCompany'; - 'Get-CustomField' = 'Get-SnipeItCustomField'; - 'Get-Department' = 'Get-SnipeItDepartment'; - 'Get-Fieldset' = 'Get-SnipeItFieldset'; - 'Get-Manufacturer' = 'Get-SnipeItManufacturer'; - 'Get-Model' = 'Get-SnipeItModel'; - 'Get-Status' = 'Get-SnipeItStatus'; - 'Get-Supplier' = 'Get-SnipeItSupplier'; - 'Get-User' = 'Get-SnipeItUser'; - 'New-Asset' = 'New-SnipeItAsset'; - 'New-AssetMaintenance' = 'New-SnipeItAssetMaintenance'; - 'New-Category' = 'New-SnipeItCategory'; - 'New-Component' = 'New-SnipeItComponent'; - 'New-CustomField' = 'New-SnipeItCustomField'; - 'New-Department' = 'New-SnipeItDepartment'; - 'New-License' = 'New-SnipeItLicense'; - 'Set-License' = 'Set-SnipeItLicense'; - 'New-Location' = 'New-SnipeItLocation'; - 'New-Manufacturer' = 'New-SnipeItManufacturer'; - 'New-Model' = 'New-SnipeItModel'; - 'New-User' = 'New-SnipeItUser'; - 'Set-Asset' = 'Set-SnipeItAsset'; - 'Set-AssetOwner' = 'Set-SnipeItAssetOwner'; - 'Set-Component' = 'Set-SnipeItComponent'; - 'Set-Model' = 'Set-SnipeItModel'; - 'Set-Info' = 'Set-SnipeItInfo'; - 'Set-User' = 'Set-SnipeItUser'; - 'New-Accessory' = 'New-SnipeItAccessory'; - 'Set-Accessory' = 'Set-SnipeItAccessory'; - 'Get-Accessory' = 'Get-SnipeItAccessory'; - 'Remove-Asset' = 'Remove-SnipeItAsset'; - 'Remove-User' = 'Remove-SnipeItUser';} - #Create unprefixed aliases Set-SnipeItAlias From 64dcc2e1273b5ce722ae06144b19b166dc89e520 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Tue, 25 May 2021 11:17:22 +0300 Subject: [PATCH 2/9] check datetime and int input types --- SnipeitPS/Public/New-SnipeItAsset.ps1 | 5 ++++- SnipeitPS/Public/Remove-SnipeItAsset.ps1 | 4 ++-- .../Public/Remove-SnipeItAssetMaintenance.ps1 | 4 ++-- SnipeitPS/Public/Remove-SnipeItUser.ps1 | 4 ++-- SnipeitPS/Public/Set-SnipeItAsset.ps1 | 10 ++++++---- SnipeitPS/Public/Set-SnipeItComponents.ps1 | 4 ++-- docs/New-SnipeItAsset.md | 8 ++++---- docs/Remove-SnipeItAsset.md | 4 ++-- docs/Remove-SnipeItUser.md | 8 ++++---- docs/Set-SnipeItAsset.md | 14 +++++++------- docs/Set-SnipeItComponent.md | 10 +++++----- 11 files changed, 40 insertions(+), 35 deletions(-) diff --git a/SnipeitPS/Public/New-SnipeItAsset.ps1 b/SnipeitPS/Public/New-SnipeItAsset.ps1 index 9db73ec..aea04e8 100644 --- a/SnipeitPS/Public/New-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/New-SnipeItAsset.ps1 @@ -106,7 +106,7 @@ function New-SnipeItAsset() [string]$purchase_cost, [parameter(mandatory = $false)] - [string]$purchase_date, + [datetime]$purchase_date, [parameter(mandatory = $false)] [int]$supplier_id, @@ -127,6 +127,9 @@ function New-SnipeItAsset() $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters + if ($values['purchase_date']) { + $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") + } if ($customfields) { diff --git a/SnipeitPS/Public/Remove-SnipeItAsset.ps1 b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 index 3fe5f53..5526cc7 100644 --- a/SnipeitPS/Public/Remove-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAsset.ps1 @@ -24,7 +24,7 @@ function Remove-SnipeItAsset () Param( [parameter(mandatory = $true)] - [int]$ID, + [int]$id, [parameter(mandatory = $true)] [string]$URL, [parameter(mandatory = $true)] @@ -35,7 +35,7 @@ function Remove-SnipeItAsset () Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = @{ - "ID" = $Name + "ID" = $id } $Body = $Values | ConvertTo-Json diff --git a/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 index e64c941..0f5d57f 100644 --- a/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItAssetMaintenance.ps1 @@ -23,7 +23,7 @@ function Remove-SnipeItAssetMaintenance { # Asset maintenance ID [Parameter(Mandatory = $true)] [int] - $ID, + $id, # SnipeIt URL [Parameter(Mandatory = $true)] @@ -39,7 +39,7 @@ function Remove-SnipeItAssetMaintenance { Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = @{ - "ID" = $ID + "ID" = $id } $Body = $Values | ConvertTo-Json diff --git a/SnipeitPS/Public/Remove-SnipeItUser.ps1 b/SnipeitPS/Public/Remove-SnipeItUser.ps1 index b6f64cf..2fae0cf 100644 --- a/SnipeitPS/Public/Remove-SnipeItUser.ps1 +++ b/SnipeitPS/Public/Remove-SnipeItUser.ps1 @@ -25,7 +25,7 @@ function Remove-SnipeItUser () Param( [parameter(mandatory = $true)] - [string]$ID, + [int]$id, [parameter(mandatory = $true)] [string]$URL, [parameter(mandatory = $true)] @@ -36,7 +36,7 @@ function Remove-SnipeItUser () Test-SnipeItAlias -invocationName $MyInvocation.InvocationName -commandName $MyInvocation.MyCommand.Name $Values = @{ - "ID" = $ID + "ID" = $id } $Body = $Values | ConvertTo-Json diff --git a/SnipeitPS/Public/Set-SnipeItAsset.ps1 b/SnipeitPS/Public/Set-SnipeItAsset.ps1 index fb3d6cf..722086d 100644 --- a/SnipeitPS/Public/Set-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAsset.ps1 @@ -79,9 +79,9 @@ function Set-SnipeItAsset() [string]$Name, - [string]$Status_id, + [int]$status_id, - [string]$Model_id, + [int]$model_id, [DateTime]$last_checkout, @@ -97,7 +97,7 @@ function Set-SnipeItAsset() [double]$purchase_cost, - [DateTime]$purchase_date, + [datetime]$purchase_date, [bool]$requestable, @@ -118,7 +118,9 @@ function Set-SnipeItAsset() $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters - if ($model_id) { $Values.Add('model_id',$model_id)} + if ($values['purchase_date']) { + $values['purchase_date'] = $values['purchase_date'].ToString("yyyy-MM-dd") + } if ($customfields) { diff --git a/SnipeitPS/Public/Set-SnipeItComponents.ps1 b/SnipeitPS/Public/Set-SnipeItComponents.ps1 index 03da9ad..bb96414 100644 --- a/SnipeitPS/Public/Set-SnipeItComponents.ps1 +++ b/SnipeitPS/Public/Set-SnipeItComponents.ps1 @@ -47,10 +47,10 @@ function Set-SnipeItComponent() Param( [parameter(mandatory = $true)] - [string]$id, + [int]$id, [parameter(mandatory = $true)] - [string]$qty, + [int]$qty, [string]$name, diff --git a/docs/New-SnipeItAsset.md b/docs/New-SnipeItAsset.md index d4057f8..a9ebd08 100644 --- a/docs/New-SnipeItAsset.md +++ b/docs/New-SnipeItAsset.md @@ -15,9 +15,9 @@ Add a new Asset to Snipe-it asset system ``` New-SnipeItAsset [-status_id] [-model_id] [[-name] ] [[-asset_tag] ] [[-serial] ] [[-company_id] ] [[-order_number] ] [[-notes] ] - [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] [[-supplier_id] ] - [[-rtd_location_id] ] [-url] [-apiKey] [[-customfields] ] [-WhatIf] - [-Confirm] [] + [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] + [[-supplier_id] ] [[-rtd_location_id] ] [-url] [-apiKey] + [[-customfields] ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -188,7 +188,7 @@ Accept wildcard characters: False Optional Purchase cost of the Asset ```yaml -Type: String +Type: DateTime Parameter Sets: (All) Aliases: diff --git a/docs/Remove-SnipeItAsset.md b/docs/Remove-SnipeItAsset.md index a79edcc..fca301d 100644 --- a/docs/Remove-SnipeItAsset.md +++ b/docs/Remove-SnipeItAsset.md @@ -13,7 +13,7 @@ Removes Asset from Snipe-it asset system ## SYNTAX ``` -Remove-SnipeItAsset [-ID] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] +Remove-SnipeItAsset [-id] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -43,7 +43,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ID +### -id Unique ID For Asset to be removed ```yaml diff --git a/docs/Remove-SnipeItUser.md b/docs/Remove-SnipeItUser.md index 22d52a1..c557202 100644 --- a/docs/Remove-SnipeItUser.md +++ b/docs/Remove-SnipeItUser.md @@ -13,7 +13,7 @@ Removes User from Snipe-it asset system ## SYNTAX ``` -Remove-SnipeItUser [-ID] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] +Remove-SnipeItUser [-id] [-URL] [-APIKey] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -43,17 +43,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ID +### -id Unique ID For User to be removed ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True Position: 1 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Set-SnipeItAsset.md b/docs/Set-SnipeItAsset.md index d199e77..626bcf2 100644 --- a/docs/Set-SnipeItAsset.md +++ b/docs/Set-SnipeItAsset.md @@ -13,7 +13,7 @@ Update a specific Asset in the Snipe-it asset system ## SYNTAX ``` -Set-SnipeItAsset [-id] [[-Name] ] [[-Status_id] ] [[-Model_id] ] +Set-SnipeItAsset [-id] [[-Name] ] [[-status_id] ] [[-model_id] ] [[-last_checkout] ] [[-assigned_to] ] [[-company_id] ] [[-serial] ] [[-order_number] ] [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] [[-requestable] ] [[-archived] ] [[-rtd_location_id] ] @@ -143,17 +143,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Model_id +### -model_id Model ID of the asset, this can be got using Get-Model ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 4 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -263,17 +263,17 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Status_id +### -status_id Status ID of the asset, this can be got using Get-Status ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: False Position: 3 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/docs/Set-SnipeItComponent.md b/docs/Set-SnipeItComponent.md index 13aeb56..6ccc875 100644 --- a/docs/Set-SnipeItComponent.md +++ b/docs/Set-SnipeItComponent.md @@ -13,7 +13,7 @@ Updates component ## SYNTAX ``` -Set-SnipeItComponent [-id] [-qty] [[-name] ] [[-company_id] ] +Set-SnipeItComponent [-id] [-qty] [[-name] ] [[-company_id] ] [[-location_id] ] [[-purchase_date] ] [[-purchase_cost] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] ``` @@ -64,13 +64,13 @@ Accept wildcard characters: False ID number of name ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True Position: 1 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` @@ -139,13 +139,13 @@ Accept wildcard characters: False Quantity of the components you have ```yaml -Type: String +Type: Int32 Parameter Sets: (All) Aliases: Required: True Position: 2 -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` From 32542fe5fccf74445ca552bd4089fb3dfd16d454 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Tue, 25 May 2021 15:44:14 +0300 Subject: [PATCH 3/9] Parameter for http request type patch/put --- SnipeitPS/Public/Set-SnipeItAsset.ps1 | 13 ++++++++- docs/Set-SnipeItAsset.md | 40 ++++++++++++++++++++++++--- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/SnipeitPS/Public/Set-SnipeItAsset.ps1 b/SnipeitPS/Public/Set-SnipeItAsset.ps1 index 722086d..d8fa71e 100644 --- a/SnipeitPS/Public/Set-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAsset.ps1 @@ -50,6 +50,12 @@ .PARAMETER rtd_location_id The id that corresponds to the location where the asset is usually located when not checked out + .PARAMETER notes + Notes about asset + + .PARAMETER RequestType + Http request type to send Snipe IT system. Defaults to Put youc use Patch if needed + .PARAMETER url URL of Snipeit system, can be set using Set-SnipeItInfoeItInfo command @@ -105,6 +111,11 @@ function Set-SnipeItAsset() [int]$rtd_location_id, + [string]$notes, + + [ValidateSet("Put","Patch")] + [string]$RequestType = "Patch", + [parameter(mandatory = $true)] [string]$url, @@ -131,7 +142,7 @@ function Set-SnipeItAsset() $Parameters = @{ Uri = "$url/api/v1/hardware/$id" - Method = 'Put' + Method = $RequestType Body = $Body Token = $apiKey } diff --git a/docs/Set-SnipeItAsset.md b/docs/Set-SnipeItAsset.md index 626bcf2..51df0a1 100644 --- a/docs/Set-SnipeItAsset.md +++ b/docs/Set-SnipeItAsset.md @@ -17,7 +17,8 @@ Set-SnipeItAsset [-id] [[-Name] ] [[-status_id] ] [[-mode [[-last_checkout] ] [[-assigned_to] ] [[-company_id] ] [[-serial] ] [[-order_number] ] [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] [[-requestable] ] [[-archived] ] [[-rtd_location_id] ] - [-url] [-apiKey] [[-customfields] ] [-WhatIf] [-Confirm] [] + [[-notes] ] [[-RequestType] ] [-url] [-apiKey] [[-customfields] ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -46,7 +47,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 17 +Position: 19 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -107,7 +108,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 18 +Position: 20 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -173,6 +174,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -notes +Notes about asset + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 16 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -order_number Order number for the asset @@ -233,6 +249,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -RequestType +Http request type to send Snipe IT system. +Defaults to Put youc use Patch if needed + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 17 +Default value: Patch +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -rtd_location_id The id that corresponds to the location where the asset is usually located when not checked out @@ -287,7 +319,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 16 +Position: 18 Default value: None Accept pipeline input: False Accept wildcard characters: False From 5d1571918523f19424556ba90d666999ab109ee2 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Tue, 25 May 2021 16:11:47 +0300 Subject: [PATCH 4/9] Added missing parameters --- SnipeitPS/Public/New-SnipeItLocation.ps1 | 7 ++++ SnipeitPS/Public/Set-SnipeItLocation.ps1 | 10 +++++ docs/New-SnipeItLocation.md | 53 +++++++++++++++++++----- docs/Set-SnipeitLocation.md | 45 ++++++++++++++++---- 4 files changed, 97 insertions(+), 18 deletions(-) diff --git a/SnipeitPS/Public/New-SnipeItLocation.ps1 b/SnipeitPS/Public/New-SnipeItLocation.ps1 index f3ecd6e..05a40bd 100644 --- a/SnipeitPS/Public/New-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/New-SnipeItLocation.ps1 @@ -32,6 +32,9 @@ .PARAMETER currency Currency used at the location + .PARAMETER city + City of the location + .PARAMETER manager_id The manager ID of the location @@ -59,12 +62,16 @@ function New-SnipeItLocation() { [string]$address2, + [string]$city, + [string]$state, [string]$country, [string]$zip, + [string]$currency, + [int]$parent_id, [int]$manager_id, diff --git a/SnipeitPS/Public/Set-SnipeItLocation.ps1 b/SnipeitPS/Public/Set-SnipeItLocation.ps1 index bc3b2f8..ab6e4c2 100644 --- a/SnipeitPS/Public/Set-SnipeItLocation.ps1 +++ b/SnipeitPS/Public/Set-SnipeItLocation.ps1 @@ -29,6 +29,12 @@ .PARAMETER manager_id Location manager as id + .PARAMETER city + City of the location + + .PARAMETER currency + Currency used at the location + .PARAMETER ldap_ou LDAP OU of Location @@ -69,6 +75,10 @@ function Set-SnipeitLocation() { [string]$zip, + [string]$city, + + [string]$currency, + [int]$manager_id, [string]$ldap_ou, diff --git a/docs/New-SnipeItLocation.md b/docs/New-SnipeItLocation.md index d2c35e9..0748a77 100644 --- a/docs/New-SnipeItLocation.md +++ b/docs/New-SnipeItLocation.md @@ -13,9 +13,10 @@ Add a new Location to Snipe-it asset system ## SYNTAX ``` -New-SnipeItLocation [-name] [[-address] ] [[-address2] ] [[-state] ] - [[-country] ] [[-zip] ] [[-parent_id] ] [[-manager_id] ] [[-ldap_ou] ] - [-url] [-apiKey] [-WhatIf] [-Confirm] [] +New-SnipeItLocation [-name] [[-address] ] [[-address2] ] [[-city] ] + [[-state] ] [[-country] ] [[-zip] ] [[-currency] ] [[-parent_id] ] + [[-manager_id] ] [[-ldap_ou] ] [-url] [-apiKey] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -69,7 +70,22 @@ Parameter Sets: (All) Aliases: Required: True -Position: 11 +Position: 13 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -city +City of the location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -84,7 +100,22 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -currency +Currency used at the location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -99,7 +130,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -114,7 +145,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 10 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -144,7 +175,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 9 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -159,7 +190,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -174,7 +205,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 10 +Position: 12 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -189,7 +220,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/docs/Set-SnipeitLocation.md b/docs/Set-SnipeitLocation.md index 8c9a0da..0a8b335 100644 --- a/docs/Set-SnipeitLocation.md +++ b/docs/Set-SnipeitLocation.md @@ -14,8 +14,9 @@ Updates Location in Snipe-it asset system ``` Set-SnipeitLocation [-id] [[-name] ] [[-address] ] [[-address2] ] - [[-state] ] [[-country] ] [[-zip] ] [[-manager_id] ] [[-ldap_ou] ] - [[-parent_id] ] [-url] [-apiKey] [-WhatIf] [-Confirm] [] + [[-state] ] [[-country] ] [[-zip] ] [[-city] ] [[-currency] ] + [[-manager_id] ] [[-ldap_ou] ] [[-parent_id] ] [-url] [-apiKey] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -69,7 +70,22 @@ Parameter Sets: (All) Aliases: Required: True -Position: 12 +Position: 14 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -city +City of the location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -90,6 +106,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -currency +Currency used at the location + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -id {{ Fill id Description }} @@ -114,7 +145,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -129,7 +160,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 10 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -159,7 +190,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 10 +Position: 12 Default value: 0 Accept pipeline input: False Accept wildcard characters: False @@ -189,7 +220,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 11 +Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False From 66e746bce08daa11cea591a1e54d09926ed58020 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Tue, 25 May 2021 22:53:22 +0300 Subject: [PATCH 5/9] Support for checkin accessories out and in --- .../Public/Get-SnipeItAccessoryOwner.ps1 | 49 ++++++ .../Public/Reset-SnipeItAccessoryOwner.ps1 | 59 +++++++ .../Public/Set-SnipeItAccessoryOwner.ps1 | 65 ++++++++ SnipeitPS/SnipeItPS.psd1 | 5 +- docs/Get-SnipeItAccessoryOwner.md | 117 ++++++++++++++ docs/Reset-SnipeItAccessoryOwner.md | 124 +++++++++++++++ docs/Set-SnipeItAccessoryOwner.md | 147 ++++++++++++++++++ docs/SnipeItPS.md | 9 ++ 8 files changed, 574 insertions(+), 1 deletion(-) create mode 100644 SnipeitPS/Public/Get-SnipeItAccessoryOwner.ps1 create mode 100644 SnipeitPS/Public/Reset-SnipeItAccessoryOwner.ps1 create mode 100644 SnipeitPS/Public/Set-SnipeItAccessoryOwner.ps1 create mode 100644 docs/Get-SnipeItAccessoryOwner.md create mode 100644 docs/Reset-SnipeItAccessoryOwner.md create mode 100644 docs/Set-SnipeItAccessoryOwner.md diff --git a/SnipeitPS/Public/Get-SnipeItAccessoryOwner.ps1 b/SnipeitPS/Public/Get-SnipeItAccessoryOwner.ps1 new file mode 100644 index 0000000..cc4c9de --- /dev/null +++ b/SnipeitPS/Public/Get-SnipeItAccessoryOwner.ps1 @@ -0,0 +1,49 @@ +<# + .SYNOPSIS + Get list of checked out accessories + .DESCRIPTION + Get list of checked out accessories + + .PARAMETER id + Unique ID For accessory to list + + .PARAMETER url + URL of Snipeit system, can be set using Set-SnipeItInfo command + + .PARAMETER apiKey + User's API Key for Snipeit, can be set using Set-SnipeItInfo command + + .EXAMPLE + Get-SnipeItAccessoryOwner -id 1 +#> +function Get-SnipeItAccessoryOwner() +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Medium" + )] + + Param( + [parameter(mandatory = $true)] + [int]$id, + + [parameter(mandatory = $true)] + [string]$url, + + [parameter(mandatory = $true)] + [string]$apiKey + ) + + $Parameters = @{ + Uri = "$url/api/v1/accessories/$id/checkedout" + Method = 'GET' + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess("ShouldProcess?")) + { + $result = Invoke-SnipeitMethod @Parameters + } + + return $result +} diff --git a/SnipeitPS/Public/Reset-SnipeItAccessoryOwner.ps1 b/SnipeitPS/Public/Reset-SnipeItAccessoryOwner.ps1 new file mode 100644 index 0000000..8f5ffe0 --- /dev/null +++ b/SnipeitPS/Public/Reset-SnipeItAccessoryOwner.ps1 @@ -0,0 +1,59 @@ +<# + .SYNOPSIS + Checkin accessories + + .DESCRIPTION + Checkin accessories + + .PARAMETER assigned_pivot_id + This is the assigned_pivot_id of the accessory+user relationships in the accessories_users table + Use Get-SnipeItAccessoryOwner to find out nooded value + + .PARAMETER url + URL of Snipeit system, can be set using Set-SnipeItInfo command + + .PARAMETER apiKey + User's API Key for Snipeit, can be set using Set-SnipeItInfo command + + .EXAMPLE + To get the accessories_users table for specific accessory id number + + Get-SnipeItAccessoryOwner -id 1 + + Thenselect assigned_pivot_id for userid you like check in + + Get-SnipeItAccessoryOwner -assigned_pivot_id xxx + +#> +function Reset-SnipeItAccessoryOwner() +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Medium" + )] + + Param( + [parameter(mandatory = $true)] + [int]$assigned_pivot_id, + + [parameter(mandatory = $true)] + [string]$url, + + [parameter(mandatory = $true)] + [string]$apiKey + ) + + $Parameters = @{ + Uri = "$url/api/v1/accessories/$assigned_pivot_id/checkin" + Method = 'Post' + Body = '{}' + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess("ShouldProcess?")) + { + $result = Invoke-SnipeitMethod @Parameters + } + + return $result +} diff --git a/SnipeitPS/Public/Set-SnipeItAccessoryOwner.ps1 b/SnipeitPS/Public/Set-SnipeItAccessoryOwner.ps1 new file mode 100644 index 0000000..2602475 --- /dev/null +++ b/SnipeitPS/Public/Set-SnipeItAccessoryOwner.ps1 @@ -0,0 +1,65 @@ +<# + .SYNOPSIS + Checkout accessory + .DESCRIPTION + Checkout accessory to user + + .PARAMETER id + Unique ID For accessory to checkout + + .PARAMETER assigned_id + Id of target user + + .PARAMETER note + Notes about checkout + + .PARAMETER url + URL of Snipeit system, can be set using Set-SnipeItInfo command + + .PARAMETER apiKey + User's API Key for Snipeit, can be set using Set-SnipeItInfo command + + .EXAMPLE + Set-SnipeItAccessoryOwner -id 1 -assigned_id 1 -note "testing check out to user" +#> +function Set-SnipeItAccessoryOwner() +{ + [CmdletBinding( + SupportsShouldProcess = $true, + ConfirmImpact = "Medium" + )] + + Param( + [parameter(mandatory = $true)] + [int]$id, + + [parameter(mandatory = $true)] + [int]$assigned_to, + + [string] $note, + + [parameter(mandatory = $true)] + [string]$url, + + [parameter(mandatory = $true)] + [string]$apiKey + ) + + $Values = . Get-ParameterValue $MyInvocation.MyCommand.Parameters + + $Body = $Values | ConvertTo-Json; + + $Parameters = @{ + Uri = "$url/api/v1/accessories/$id/checkout" + Method = 'POST' + Body = $Body + Token = $apiKey + } + + If ($PSCmdlet.ShouldProcess("ShouldProcess?")) + { + $result = Invoke-SnipeitMethod @Parameters + } + + return $result +} diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 0f7a1e0..8bc84b8 100644 --- a/SnipeitPS/SnipeItPS.psd1 +++ b/SnipeitPS/SnipeItPS.psd1 @@ -111,7 +111,10 @@ FunctionsToExport = @( 'Get-SnipeItAccessory', 'Remove-SnipeItAsset', 'Remove-SnipeItUser', - 'Update-SnipeItAlias' + 'Update-SnipeItAlias', + 'Set-SnipeItAccessoryOwner', + 'Get-SnipeItAccessoryOwner', + 'Reset-SnipeItAccessoryOwner' ) diff --git a/docs/Get-SnipeItAccessoryOwner.md b/docs/Get-SnipeItAccessoryOwner.md new file mode 100644 index 0000000..ae75064 --- /dev/null +++ b/docs/Get-SnipeItAccessoryOwner.md @@ -0,0 +1,117 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Get-SnipeItAccessoryOwner + +## SYNOPSIS +Get list of checked out accessories + +## SYNTAX + +``` +Get-SnipeItAccessoryOwner [-id] [-url] [-apiKey] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Get list of checked out accessories + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-SnipeItAccessoryOwner -id 1 +``` + +## PARAMETERS + +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +Unique ID For accessory to list + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### 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). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Reset-SnipeItAccessoryOwner.md b/docs/Reset-SnipeItAccessoryOwner.md new file mode 100644 index 0000000..e777d94 --- /dev/null +++ b/docs/Reset-SnipeItAccessoryOwner.md @@ -0,0 +1,124 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Reset-SnipeItAccessoryOwner + +## SYNOPSIS +Checkin accessories + +## SYNTAX + +``` +Reset-SnipeItAccessoryOwner [-assigned_pivot_id] [-url] [-apiKey] [-WhatIf] + [-Confirm] [] +``` + +## DESCRIPTION +Checkin accessories + +## EXAMPLES + +### EXAMPLE 1 +``` +To get the accessories_users table for specific accessory id number +``` + +Get-SnipeItAccessoryOwner -id 1 + +Thenselect assigned_pivot_id for userid you like check in + +Get-SnipeItAccessoryOwner -assigned_pivot_id xxx + +## PARAMETERS + +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -assigned_pivot_id +This is the assigned_pivot_id of the accessory+user relationships in the accessories_users table +Use Get-SnipeItAccessoryOwner to find out nooded value + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### 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). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/Set-SnipeItAccessoryOwner.md b/docs/Set-SnipeItAccessoryOwner.md new file mode 100644 index 0000000..98da95c --- /dev/null +++ b/docs/Set-SnipeItAccessoryOwner.md @@ -0,0 +1,147 @@ +--- +external help file: SnipeItPS-help.xml +Module Name: SnipeitPS +online version: +schema: 2.0.0 +--- + +# Set-SnipeItAccessoryOwner + +## SYNOPSIS +Checkout accessory + +## SYNTAX + +``` +Set-SnipeItAccessoryOwner [-id] [-assigned_to] [[-note] ] [-url] + [-apiKey] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Checkout accessory to user + +## EXAMPLES + +### EXAMPLE 1 +``` +Set-SnipeItAccessoryOwner -id 1 -assigned_id 1 -note "testing check out to user" +``` + +## PARAMETERS + +### -apiKey +User's API Key for Snipeit, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -assigned_to +{{ Fill assigned_to Description }} + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -id +Unique ID For accessory to checkout + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -note +Notes about checkout + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -url +URL of Snipeit system, can be set using Set-SnipeItInfo command + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### 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). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/docs/SnipeItPS.md b/docs/SnipeItPS.md index 4b03e7d..dbc6cf3 100644 --- a/docs/SnipeItPS.md +++ b/docs/SnipeItPS.md @@ -14,6 +14,9 @@ Locale: en-US ### [Get-SnipeItAccessory](Get-SnipeItAccessory.md) Gets a list of Snipe-it Accessories +### [Get-SnipeItAccessoryOwner](Get-SnipeItAccessoryOwner.md) +Get list of checked out accessories + ### [Get-SnipeItAsset](Get-SnipeItAsset.md) Gets a list of Snipe-it Assets or specific asset @@ -92,9 +95,15 @@ Removes Asset from Snipe-it asset system ### [Remove-SnipeItUser](Remove-SnipeItUser.md) Removes User from Snipe-it asset system +### [Reset-SnipeItAccessoryOwner](Reset-SnipeItAccessoryOwner.md) +Checkin accessories + ### [Set-SnipeItAccessory](Set-SnipeItAccessory.md) Updates accessory on Snipe-It system +### [Set-SnipeItAccessoryOwner](Set-SnipeItAccessoryOwner.md) +Checkout accessory + ### [Set-SnipeItAsset](Set-SnipeItAsset.md) Update a specific Asset in the Snipe-it asset system From 4810bbf54fa01f8ed78cbaf7c7dcc9043ceaa1cf Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Tue, 25 May 2021 23:24:36 +0300 Subject: [PATCH 6/9] Wrapped json parsing with try/catch --- SnipeitPS/Private/Invoke-SnipeitMethod.ps1 | 38 +++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 b/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 index 8400267..2e3779d 100644 --- a/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 +++ b/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 @@ -85,26 +85,32 @@ Write-Verbose $webResponse.Content # API returned a Content: lets work wit it - $response = ConvertFrom-Json -InputObject $webResponse.Content + try{ + $response = ConvertFrom-Json -InputObject $webResponse.Content - if ($response.status -eq "error") { - Write-Verbose "[$($MyInvocation.MyCommand.Name)] An error response was received from; resolving" - # This could be handled nicely in an function such as: - # ResolveError $response -WriteError - Write-Error $($response.messages | Out-String) - } - else { - $result = $response - if (($response) -and ($response | Get-Member -Name payload)) - { - $result = $response.payload - } - elseif (($response) -and ($response | Get-Member -Name rows)) { - $result = $response.rows + if ($response.status -eq "error") { + Write-Verbose "[$($MyInvocation.MyCommand.Name)] An error response was received from; resolving" + # This could be handled nicely in an function such as: + # ResolveError $response -WriteError + Write-Error $($response.messages | Out-String) } + else { + $result = $response + if (($response) -and ($response | Get-Member -Name payload)) + { + $result = $response.payload + } + elseif (($response) -and ($response | Get-Member -Name rows)) { + $result = $response.rows + } - $result + $result + } } + catch { + Write-Warning "Cannot parse server response. To debug try to add -Verbose with command." + } + } elseif ($webResponse.StatusCode -eq "Unauthorized") { Write-Error "[$($MyInvocation.MyCommand.Name)] You are not Authorized to access the resource, check your token is correct" From 446a21fcf7b893d224986f5745fcf982f81871c5 Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Thu, 27 May 2021 14:44:39 +0300 Subject: [PATCH 7/9] fixed parameter case --- SnipeitPS/Public/Set-SnipeItAsset.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SnipeitPS/Public/Set-SnipeItAsset.ps1 b/SnipeitPS/Public/Set-SnipeItAsset.ps1 index d8fa71e..d183b15 100644 --- a/SnipeitPS/Public/Set-SnipeItAsset.ps1 +++ b/SnipeitPS/Public/Set-SnipeItAsset.ps1 @@ -83,7 +83,7 @@ function Set-SnipeItAsset() [parameter(mandatory = $true)] [int]$id, - [string]$Name, + [string]$name, [int]$status_id, From 1b45467675277ffdd1f95ee10e0c93993ebfde2e Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Thu, 27 May 2021 14:51:22 +0300 Subject: [PATCH 8/9] fixed parameter case --- docs/Set-SnipeItAsset.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Set-SnipeItAsset.md b/docs/Set-SnipeItAsset.md index 51df0a1..831e7f4 100644 --- a/docs/Set-SnipeItAsset.md +++ b/docs/Set-SnipeItAsset.md @@ -13,7 +13,7 @@ Update a specific Asset in the Snipe-it asset system ## SYNTAX ``` -Set-SnipeItAsset [-id] [[-Name] ] [[-status_id] ] [[-model_id] ] +Set-SnipeItAsset [-id] [[-name] ] [[-status_id] ] [[-model_id] ] [[-last_checkout] ] [[-assigned_to] ] [[-company_id] ] [[-serial] ] [[-order_number] ] [[-warranty_months] ] [[-purchase_cost] ] [[-purchase_date] ] [[-requestable] ] [[-archived] ] [[-rtd_location_id] ] @@ -159,7 +159,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Name +### -name Asset name ```yaml From 3f58e8eaac750150509d7d1a99b916b0e937225b Mon Sep 17 00:00:00 2001 From: Petri Asikainen Date: Thu, 27 May 2021 15:11:28 +0300 Subject: [PATCH 9/9] Version bumb to 1.3 --- CHANGELOG.md | 17 +++++++++++++++++ SnipeitPS/SnipeItPS.psd1 | 2 +- appveyor.yml | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2b243..58673ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ 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/). +# [v1.3.x] - 2021-05-27 + +## Checking out accessories + +### New features +You can specify Put or Patch for Set-SnipeItAsset when updating assets. +Set-SnipeItLocation new -city parameter + +### New Functions +- Set-SnipeItAccessoryOwner checkout accessory +- Get-SnipeItAccessoryOwner list checkedout accessories +- Reset-SnipeItAccessoryOwner checkin accessory + +### Fixes +- Set-SnipeItAsset fixed datetime and name inputs #126,128 +- + # [v1.2.x] - 2021-05-24 ## Prefixing SnipeItPS diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 8bc84b8..d96d5d8 100644 --- a/SnipeitPS/SnipeItPS.psd1 +++ b/SnipeitPS/SnipeItPS.psd1 @@ -12,7 +12,7 @@ RootModule = 'SnipeItPS' # Version number of this module. -ModuleVersion = '1.2' +ModuleVersion = '1.3' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/appveyor.yml b/appveyor.yml index f0d02fd..14a5ce6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,7 +14,7 @@ environment: PSGalleryAPIKey: secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm -version: 1.2.{build} +version: 1.3.{build} # Don't rebuild when I tag a release on GitHub skip_tags: true