diff --git a/SnipeitPS/Public/Get-Location.ps1 b/SnipeitPS/Public/Get-SnipeitLocation.ps1 similarity index 96% rename from SnipeitPS/Public/Get-Location.ps1 rename to SnipeitPS/Public/Get-SnipeitLocation.ps1 index 3fb46cf..0030a89 100644 --- a/SnipeitPS/Public/Get-Location.ps1 +++ b/SnipeitPS/Public/Get-SnipeitLocation.ps1 @@ -16,7 +16,7 @@ Get-Location -url "https://assets.example.com" -token "token..." | Where-Object #> -function Get-Location() +function Get-SnipeitLocation() { Param( [string]$search, diff --git a/SnipeitPS/Public/New-AssetMaintenance.ps1 b/SnipeitPS/Public/New-AssetMaintenance.ps1 index 2a64d05..e79b814 100644 --- a/SnipeitPS/Public/New-AssetMaintenance.ps1 +++ b/SnipeitPS/Public/New-AssetMaintenance.ps1 @@ -1,38 +1,3 @@ -<# - .SYNOPSIS - Add a new Asset to Snipe-it asset system - - .DESCRIPTION - Long description - - .PARAMETER Tag - Asset Tag for the Asset - - .PARAMETER Name - Name of the Asset - - .PARAMETER Status_id - Status ID of the asset, this can be got using Get-Status - - .PARAMETER Model_id - Model ID of the asset, this can be got using Get-Model - - .PARAMETER url - URL of Snipeit system, can be set using Set-Info command - - .PARAMETER apiKey - Users API Key for Snipeit, can be set using Set-Info command - - .PARAMETER customfields - Hastable of custom fields and extra fields that need passing through to Snipeit - - .EXAMPLE - New-Asset -status_id 1 -model_id 1 -name "Machine1" - - .EXAMPLE - New-Asset -status_id 1 -model_id 1 -name "Machine1" -CustomValues = @{ "_snipeit_os_5 = "Windows 10 Pro" } -#> - function New-AssetMaintenance() { [CmdletBinding( SupportsShouldProcess = $true, @@ -53,10 +18,10 @@ function New-AssetMaintenance() { [string]$title, [parameter(mandatory = $true)] - [datetime]$startDate, + [datetime]$start_date, [parameter(mandatory = $false)] - [datetime]$completionDate, + [datetime]$completion_date, [bool]$is_warranty = $false, @@ -77,8 +42,8 @@ function New-AssetMaintenance() { $values['startdate'] = $values['start_date'].ToString("yyyy-MM-dd") } - if ($values['completionDate']) { - $values['completionDate'] = $values['completionDate'].ToString("yyyy-MM-dd") + if ($values['completion_date']) { + $values['completion_date'] = $values['completion_date'].ToString("yyyy-MM-dd") } $Body = $Values | ConvertTo-Json; diff --git a/SnipeitPS/SnipeItPS.psd1 b/SnipeitPS/SnipeItPS.psd1 index 2d05b60..780aa3c 100644 Binary files a/SnipeitPS/SnipeItPS.psd1 and b/SnipeitPS/SnipeItPS.psd1 differ