From dc9a5ff6270429c83369792c851f38a194dbc71a Mon Sep 17 00:00:00 2001 From: Mikey O'Toole Date: Tue, 3 Sep 2024 22:20:31 +0100 Subject: [PATCH] Fix broken parameters on New-NinjaOneOrganisationDocument and New-NinjaOneOrganisationDocuments. --- CHANGELOG.md | 4 ++++ Source/NinjaOne.psd1 | 2 +- .../New/New-NinjaOneOrganisationDocument.ps1 | 4 ++-- .../New/New-NinjaOneOrganisationDocuments.ps1 | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 939c1a0..ceb2f31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Please note that backwards compatibility breaks are prefixed with `{"BC"}` (short for Breaking Change). +## 2024-09-03 - Version 2.0.2 + +* Fix incorrect parameter type for `-organisationDocument` and `-organisationDocuments` parameters on the `New-NinjaOneOrganisationDocument` and `New-NinjaOneOrganisationDocuments` commandlets. + ## 2024-08-16 - Version 2.0.1 * Remove debugging statements forcing `Write-Information` output to always display. diff --git a/Source/NinjaOne.psd1 b/Source/NinjaOne.psd1 index 170c29b..f71bba3 100644 --- a/Source/NinjaOne.psd1 +++ b/Source/NinjaOne.psd1 @@ -12,7 +12,7 @@ RootModule = '.\NinjaOne.psm1' # Version number of this module. - ModuleVersion = '2.0.1' + ModuleVersion = '2.0.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocument.ps1 b/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocument.ps1 index 9d76b87..a1c7685 100644 --- a/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocument.ps1 +++ b/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocument.ps1 @@ -30,8 +30,8 @@ function New-NinjaOneOrganisationDocument { [String]$documentTemplateId, # An object containing an array of organisation documents to create. [Parameter(Mandatory, Position = 2, ValueFromPipeline, ValueFromPipelineByPropertyName)] - [Alias('organizationDocuments', 'body')] - [NinjaOneOrganisationDocument[]]$organisationDocuments, + [Alias('organizationDocuments', 'organisationDocuments', 'organizationDocument', 'body')] + [Object]$organisationDocument, # Show the organisation document that was created. [Switch]$show ) diff --git a/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocuments.ps1 b/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocuments.ps1 index dd323a5..e1a2456 100644 --- a/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocuments.ps1 +++ b/Source/Public/OrganisationDocuments/New/New-NinjaOneOrganisationDocuments.ps1 @@ -23,7 +23,7 @@ function New-NinjaOneOrganisationDocuments { # An object containing an array of organisation documents to create. [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)] [Alias('organizationDocuments', 'body')] - [NinjaOneOrganisationDocument[]]$organisationDocuments, + [Object[]]$organisationDocuments, # Show the organisation documents that were created. [Switch]$show )