Skip to content

Commit

Permalink
Fixes for RC6.
Browse files Browse the repository at this point in the history
  • Loading branch information
homotechsual committed Jul 28, 2024
1 parent 53bc330 commit 66db7e9
Show file tree
Hide file tree
Showing 15 changed files with 262 additions and 209 deletions.
232 changes: 134 additions & 98 deletions .build/CommandletShortNames.yaml
Original file line number Diff line number Diff line change
@@ -1,98 +1,134 @@
Connect-NinjaOne: NinjaOne
Find-NinjaOneDevices: Devices
Get-NinjaOneActivities: Activities
Get-NinjaOneAlerts: Alerts
Get-NinjaOneAntiVirusStatus: AntiVirus Status Query
Get-NinjaOneAntiVirusThreats: AntiVirus Threats Query
Get-NinjaOneAttachment: Attachment
Get-NinjaOneBackupJobs: Backup Jobs
Get-NinjaOneBackupUsage: Backup Usage Query
Get-NinjaOneComputerSystems: Computer Systems Query
Get-NinjaOneContacts: Contacts
Get-NinjaOneCustomFields: Custom Fields Query
Get-NinjaOneDeviceCustomFields: Device Custom Fields
Get-NinjaOneDeviceDashboardURL: Device Dashboard URL
Get-NinjaOneDeviceDisks: Device Disks
Get-NinjaOneDeviceHealth: Device Health Query
Get-NinjaOneDeviceLastLoggedOnUser: Device Last Logged On User
Get-NinjaOneDeviceNetworkInterfaces: Device Network Interfaces
Get-NinjaOneDeviceOSPatches: Device OS Patches
Get-NinjaOneDeviceOSPatchInstalls: Device OS Patch Installs
Get-NinjaOneDevicePolicyOverrides: Device Policy Overrides
Get-NinjaOneDeviceProcessors: Device Processors
Get-NinjaOneDevices: Devices
Get-NinjaOneDeviceScriptingOptions: Device Scripting Options
Get-NinjaOneDeviceSoftwarePatches: Device Software Patches
Get-NinjaOneDeviceSoftwarePatchInstalls: Device Software Patch Installs
Get-NinjaOneDeviceVolumes: Device Volumes
Get-NinjaOneDeviceWindowsServices: Device Windows Services
Get-NinjaOneDisks: Disks Query
Get-NinjaOneDocumentTemplates: Document Template
Get-NinjaOneGroupMembers: Group Members
Get-NinjaOneGroups: Groups
Get-NinjaOneInstaller: Installer
Get-NinjaOneJobs: Jobs
Get-NinjaOneLocationBackupUsage: Location Backup Usage
Get-NinjaOneLocationCustomFields: Location Custom Fields
Get-NinjaOneLocations: Locations
Get-NinjaOneLoggedOnUsers: Logged On Users Query
Get-NinjaOneNetworkInterfaces: Network Interfaces Query
Get-NinjaOneOperatingSystems: Operating Systems Query
Get-NinjaOneOrganisationCustomFields: Organisation Custom Fields
Get-NinjaOneOrganisationDocuments: Documents
Get-NinjaOneOrganisations: Organisations
Get-NinjaOneOSPatches: OS Patches Query
Get-NinjaOneOSPatchInstalls: OS Patch Installs Query
Get-NinjaOnePolicies: Policies
Get-NinjaOnePolicyOverrides: Policy Overrides Query
Get-NinjaOneProcessors: Processors Query
Get-NinjaOneRAIDControllers: RAID Controllers Query
Get-NinjaOneRAIDDrives: RAID Drives Query
Get-NinjaOneRelatedItems: Related Items
Get-NinjaOneRoles: Device Roles
Get-NinjaOneSoftwareInventory: Software Inventory Query
Get-NinjaOneSoftwarePatches: Software Patches Query
Get-NinjaOneSoftwarePatchInstalls: Software Patch Installs Query
Get-NinjaOneSoftwareProducts: Software Products
Get-NinjaOneTasks: Scheduled Tasks
Get-NinjaOneTicketAttributes: Ticket Attributes
Get-NinjaOneTicketBoards: Ticket Boards
Get-NinjaOneTicketForms: Ticket Forms
Get-NinjaOneTicketLogEntries: Ticket Log Entries
Get-NinjaOneTickets: Tickets
Get-NinjaOneTicketStatuses: Ticket Statuses
Get-NinjaOneUsers: Users
Get-NinjaOneVolumes: Volumes Query
Get-NinjaOneWindowsServices: Windows Services Query
Invoke-NinjaOneDeviceScript: Script or Action
Invoke-NinjaOneRequest: API Request
Invoke-NinjaOneWindowsServiceAction: Windows Service Action
New-NinjaOneDocumentTemplate: Document Template
New-NinjaOneInstaller: Installer
New-NinjaOneLocation: Location
New-NinjaOneOrganisation: Organisation
New-NinjaOneOrganisationDocument: Organisation Documents
New-NinjaOnePolicy: Policy
New-NinjaOneTicket: Ticket
New-NinjaOneTicketComment: Ticket Comment
Remove-NinjaOneDeviceMaintenance: Maintenance
Remove-NinjaOneDocumentTemplate: Document Template
Remove-NinjaOneWebhook: Webhook
Reset-NinjaOneAlert: Alert
Reset-NinjaOneDevicePolicyOverrides: Device Policy Overrides
Restart-NinjaOneDevice: Device
Set-NinjaOneDevice: Device
Set-NinjaOneDeviceApproval: Device Approval
Set-NinjaOneDeviceCustomFields: Device Custom Fields
Set-NinjaOneDeviceMaintenance: Device Maintenance
Set-NinjaOneDocumentTemplate: Document Template
Set-NinjaOneLocation: Location
Set-NinjaOneLocationCustomFields: Location Custom Fields
Set-NinjaOneOrganisation: Organisation
Set-NinjaOneOrganisationCustomFields: Organisation Custom Fields
Set-NinjaOneOrganisationDocument: Organisation Document
Set-NinjaOneOrganisationDocuments: Organisation Documents
Set-NinjaOneOrganisationPolicies: Organisation Policies
Set-NinjaOneTicket: Ticket
Set-NinjaOneWindowsServiceConfiguration: Windows Service Configuration
Update-NinjaOneWebhook: Webhook
Connect-NinjaOne: NinjaOne
Find-NinjaOneDevices: Devices
Get-NinjaOneActivities: Activities
Get-NinjaOneAlerts: Alerts
Get-NinjaOneAntiVirusStatus: AntiVirus Status Query
Get-NinjaOneAntiVirusThreats: AntiVirus Threats Query
Get-NinjaOneAutomations: Automation Scripts
Get-NinjaOneBackupJobs: Backup Jobs
Get-NinjaOneComputerSystems: Computer Systems Query
Get-NinjaOneContacts: Contacts
Get-NinjaOneCustomFields: Custom Fields Query
Get-NinjaOneCustomFieldSignedURLs: Custom Field Signed URLs
Get-NinjaOneCustomFieldsPolicyCondition: Custom Field Policy Condition
Get-NinjaOneCustomFieldsPolicyConditions: Custom Field Policy Conditions
Get-NinjaOneDeviceActivities: Device Activities
Get-NinjaOneDeviceAlerts: Device Alerts
Get-NinjaOneDeviceBackupUsage: Backup Usage Query
Get-NinjaOneDeviceCustomFields: Device Custom Fields
Get-NinjaOneDeviceDashboardURL: Device Dashboard URL
Get-NinjaOneDeviceDisks: Device Disk drives
Get-NinjaOneDeviceHealth: Device Health Query
Get-NinjaOneDeviceJobs: Device Jobs
Get-NinjaOneDeviceLastLoggedOnUser: Device Last Logged On User
Get-NinjaOneDeviceNetworkInterfaces: Device Network Interfaces
Get-NinjaOneDeviceOSPatches: Device OS Patches
Get-NinjaOneDeviceOSPatchInstalls: Device OS Patch Installs
Get-NinjaOneDevicePolicyOverrides: Device Policy Overrides
Get-NinjaOneDeviceProcessors: Device Processors
Get-NinjaOneDevices: Devices
Get-NinjaOneDeviceScriptingOptions: Device Scripting Options
Get-NinjaOneDeviceSoftwareInventory: Device Software Inventory
Get-NinjaOneDeviceSoftwarePatches: Device Software Patches
Get-NinjaOneDeviceSoftwarePatchInstalls: Device Software Patch Installs
Get-NinjaOneDeviceVolumes: Device Volumes
Get-NinjaOneDeviceWindowsServices: Device Windows Services
Get-NinjaOneDisks: Disks Query
Get-NinjaOneDocumentTemplates: Document Template
Get-NinjaOneGroupMembers: Group Members
Get-NinjaOneGroups: Groups
Get-NinjaOneInstaller: Installer
Get-NinjaOneIntegrityCheckJobs: Integrity Check Jobs
Get-NinjaOneJobs: Jobs
Get-NinjaOneKnowledgeBaseArticle: Knowledge Base Article
Get-NinjaOneKnowledgeBaseFolders: Knowledge Base Folders
Get-NinjaOneLocationCustomFields: Location Custom Fields
Get-NinjaOneLocations: Locations
Get-NinjaOneLoggedOnUsers: Logged On Users Query
Get-NinjaOneNetworkInterfaces: Network Interfaces Query
Get-NinjaOneNotificationChannels: Notification Channels
Get-NinjaOneOperatingSystems: Operating Systems Query
Get-NinjaOneOrganisationCustomFields: Organisation Custom Fields
Get-NinjaOneOrganisationDocuments: Organisation Documents
Get-NinjaOneOrganisationDocumentSignedURLs: Organisation Document Signed URLs
Get-NinjaOneOrganisationInformation: Organisation Information
Get-NinjaOneOrganisationKnowledgeBaseArticles: Organisation Knowledge Base Articles
Get-NinjaOneOrganisationLocationBackupUsage: Location Backup Usage
Get-NinjaOneOrganisationLocations: Organisation Locations
Get-NinjaOneOrganisationLocationsBackupUsage: Organisation Locations Backup Usage
Get-NinjaOneOrganisations: Organisations
Get-NinjaOneOrganisationUsers: Organisation Users
Get-NinjaOneOSPatches: OS Patches Query
Get-NinjaOneOSPatchInstalls: OS Patch Installs Query
Get-NinjaOnePolicies: Policies
Get-NinjaOnePolicyOverrides: Policy Overrides Query
Get-NinjaOneProcessors: Processors Query
Get-NinjaOneRAIDControllers: RAID Controllers Query
Get-NinjaOneRAIDDrives: RAID Drives Query
Get-NinjaOneRelatedItemAttachment: Related Item Attachment
Get-NinjaOneRelatedItemAttachmentSignedURLs: Related Item Attachment Signed URLs
Get-NinjaOneRelatedItems: Related Items
Get-NinjaOneRoles: Device Roles
Get-NinjaOneSoftwareInventory: Software Inventory Query
Get-NinjaOneSoftwarePatches: Software Patches Query
Get-NinjaOneSoftwarePatchInstalls: Software Patch Installs Query
Get-NinjaOneSoftwareProducts: Software Products
Get-NinjaOneTasks: Scheduled Tasks
Get-NinjaOneTicketAttributes: Ticket Attributes
Get-NinjaOneTicketBoards: Ticket Boards
Get-NinjaOneTicketForms: Ticket Forms
Get-NinjaOneTicketingUsers: Ticketing Users
Get-NinjaOneTicketLogEntries: Ticket Log Entries
Get-NinjaOneTickets: Tickets
Get-NinjaOneTicketStatuses: Ticket Statuses
Get-NinjaOneUsers: Users
Get-NinjaOneVolumes: Volumes Query
Get-NinjaOneWindowsEventPolicyCondition: Windows Event Policy Condition
Get-NinjaOneWindowsServices: Windows Services Query
Invoke-NinjaOneDeviceScript: Script or Action
Invoke-NinjaOneRequest: API Request
Invoke-NinjaOneWindowsServiceAction: Windows Service Action
New-NinjaOneAttachmentRelation: Attachment Relation
New-NinjaOneCustomFieldObject: Custom Field Object Helper
New-NinjaOneCustomFieldsPolicyCondition: Custom Fields Policy Condition
New-NinjaOneDocumentTemplate: Document Template
New-NinjaOneDocumentTemplateFieldObject: Document Template Field Object Helper
New-NinjaOneEntityRelation: Entity Relation
New-NinjaOneEntityRelationObject: Entity Relation Object Helper
New-NinjaOneEntityRelations: Entity Relations
New-NinjaOneInstaller: Installer
New-NinjaOneIntegrityCheckJob: Integrity Check Job
New-NinjaOneLocation: Location
New-NinjaOneOrganisation: Organisation
New-NinjaOneOrganisationDocument: Organisation Documents
New-NinjaOneOrganisationDocuments: Organisation Documents
New-NinjaOnePolicy: Policy
New-NinjaOneSecureRelation: Secure Value Relation
New-NinjaOneTicket: Ticket
New-NinjaOneTicketComment: Ticket Comment
New-NinjaOneWindowsEventPolicyCondition: Windows Event Policy Condition
Remove-NinjaOneDeviceMaintenance: Maintenance
Remove-NinjaOneDocumentTemplate: Document Template
Remove-NinjaOneOrganisationDocument: Organisation Document
Remove-NinjaOnePolicyCondition: Policy Condition
Remove-NinjaOneRelatedItem: Related Item
Remove-NinjaOneRelatedItems: Related Items
Remove-NinjaOneWebhook: Webhook
Reset-NinjaOneAlert: Alert
Reset-NinjaOneDevicePolicyOverrides: Device Policy Overrides
Restart-NinjaOneDevice: Device
Set-NinjaOneDevice: Device
Set-NinjaOneDeviceApproval: Device Approval
Set-NinjaOneDeviceCustomFields: Device Custom Fields
Set-NinjaOneDeviceMaintenance: Device Maintenance
Set-NinjaOneDocumentTemplate: Document Template
Set-NinjaOneLocation: Location
Set-NinjaOneLocationCustomFields: Location Custom Fields
Set-NinjaOneOrganisation: Organisation
Set-NinjaOneOrganisationCustomFields: Organisation Custom Fields
Set-NinjaOneOrganisationDocument: Organisation Document
Set-NinjaOneOrganisationDocuments: Organisation Documents
Set-NinjaOneOrganisationPolicies: Organisation Policies
Set-NinjaOneTicket: Ticket
Set-NinjaOneWindowsServiceConfiguration: Windows Service Configuration
Update-NinjaOneWebhook: Webhook
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

Please note that backwards compatibility breaks are prefixed with `{"BC"}` (short for Breaking Change).

## 2024-07-26 - Version 2.0.0-RC5
## 2024-07-28 - Version 2.0.0-RC6

* Fix double declaration of `Get-NinjaOneOrganisationInformation` (once as an alias and once as a new wrapper commandlet!)
* Fix incorrect output type on `New-NinjaOneCustomFieldsObject`.
* Fix incorrect output type on `New-NinjaOneDocumentTemplateObject`.
* Fix incorrect parameter alias on `policyId` param for Windows Event and Custom Field commandlets.
* Fix incorrect parameter alias on `deviceId` param for Integrity Check Job commandlet.

## 2024-07-28 - Version 2.0.0-RC5

* Add new commandlets:
* `Get-NinjaOneAutomations`
Expand Down
13 changes: 6 additions & 7 deletions RequiredModules.psd1
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@{
Pester = '5.*'
PlatyPS = '0.14.2'
PSScriptAnalyzer = '1.*'
'Alt3.Docusaurus.PowerShell' = '1.0.34'
YAYAML = '0.2.1'
Metadata = '1.*'
ModuleBuilder = '3.*'
Pester = '5.*'
PlatyPS = '0.14.2'
PSScriptAnalyzer = '1.*'
YAYAML = '0.2.1'
Metadata = '1.*'
ModuleBuilder = '3.*'
}
72 changes: 36 additions & 36 deletions Source/Initialisation.ps1
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
[int32]$Script:NRAPIDefaultPageSize = 2000
[Hashtable]$Script:NRAPIInstances = @{
'eu' = 'https://eu.ninjarmm.com'
'oc' = 'https://oc.ninjarmm.com'
'us' = 'https://app.ninjarmm.com'
'ca' = 'https://ca.ninjarmm.com'
'us2' = 'https://us2.ninjarmm.com'
}
enum EntityType {
ORGANIZATION = 1
DOCUMENT = 2
LOCATION = 3
NODE = 4
ATTACHMENT = 5
TECHNICIAN = 6
CREDENTIAL = 7
CHECKLIST = 8
END_USER = 9
CONTACT = 10
KB_DOCUMENT = 11
}

enum FilterOperator {
present = 1
not_present = 2
is = 3
is_not = 4
contains = 5
not_contains = 6
contains_any = 7
contains_none = 8
greater_than = 9
less_than = 10
greater_or_equal_than = 11
less_or_equal_than = 12
between = 13
[int32]$Script:NRAPIDefaultPageSize = 2000
[Hashtable]$Script:NRAPIInstances = @{
'eu' = 'https://eu.ninjarmm.com'
'oc' = 'https://oc.ninjarmm.com'
'us' = 'https://app.ninjarmm.com'
'ca' = 'https://ca.ninjarmm.com'
'us2' = 'https://us2.ninjarmm.com'
}
enum EntityType {
ORGANIZATION = 1
DOCUMENT = 2
LOCATION = 3
NODE = 4
ATTACHMENT = 5
TECHNICIAN = 6
CREDENTIAL = 7
CHECKLIST = 8
END_USER = 9
CONTACT = 10
KB_DOCUMENT = 11
}

enum FilterOperator {
present = 1
not_present = 2
is = 3
is_not = 4
contains = 5
not_contains = 6
contains_any = 7
contains_none = 8
greater_than = 9
less_than = 10
greater_or_equal_than = 11
less_or_equal_than = 12
between = 13
}
4 changes: 2 additions & 2 deletions Source/NinjaOne.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@
IconUri = 'https://pbs.twimg.com/profile_images/1452496768030187521/kIGQii5Y_400x400.jpg'

# ReleaseNotes of this module
ReleaseNotes = 'Fix userType parameter on Get-NOUser.'
ReleaseNotes = 'https://github.com/homotechsual/NinjaOne/releases/tag/2.0.0-RC6'

# Prerelease string of this module
Prerelease = 'RC5'
Prerelease = 'RC6'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
Expand Down
2 changes: 1 addition & 1 deletion Source/Public/Backup/New/New-NinjaOneIntegrityCheckJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function New-NinjaOneIntegrityCheckJob {
Param(
# The deviceId to create the integrity check job for.
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[Alias('id', 'deviceId')]
[Alias('id')]
[Int]$deviceId,
# The planUid to create the integrity check job for.
[Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function New-NinjaOneCustomFieldsPolicyCondition {
Param(
# The policy id to create the custom fields policy condition for.
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[Alias('id', 'policyId')]
[Alias('id')]
[Int]$policyId,
# An object containing the custom fields policy condition to create.
[Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function New-NinjaOneWindowsEventPolicyCondition {
Param(
# The policy id to create the windows event policy condition for.
[Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[Alias('id', 'policyId')]
[Alias('id')]
[Int]$policyId,
# An object containing the windows event policy condition to create.
[Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ function New-NinjaOneCustomFieldObject {
Create a new Custom Field object.
.DESCRIPTION
Creates a new Custom Field object containing required / specified properties / structure.
.FUNCTIONALITY
Custom Field Object Helper
.OUTPUTS
[CustomField]
[Object]
A new Custom Field object.
#>
[CmdletBinding()]
[OutputType([CustomField])]
[OutputType([Object])]
[Alias('nnodtfo')]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'Does not change system state, creates a new object.')]
param(
Expand Down
Loading

0 comments on commit 66db7e9

Please sign in to comment.