Skip to content

Conversation

@stevevillardi
Copy link
Collaborator

@stevevillardi stevevillardi commented Oct 29, 2025

Change List

7.7.0

New Cmdlets

  • Get-LMRecentlyDeleted: Retrieve recycle-bin entries with optional date, resource type, and deleted-by filters.
  • Restore-LMRecentlyDeleted: Batch restore recycle-bin items by recycle identifier.
  • Remove-LMRecentlyDeleted: Permanently delete recycle-bin entries in bulk.
  • Get-LMIntegration: Retrieve integration configurations from LogicMonitor.
  • Remove-LMIntegration: Remove integrations by ID or name.
  • Remove-LMEscalationChain: Remove escalation chains by ID or name.
  • Invoke-LMReportExecution: Trigger on-demand execution of LogicMonitor reports with optional admin impersonation and custom email recipients.
  • Get-LMReportExecutionTask: Check the status and retrieve results of previously triggered report executions.
  • Invoke-LMAPIRequest: Universal API request cmdlet for advanced users to access any LogicMonitor API endpoint with custom payloads while leveraging module authentication, retry logic, and debug utilities.

Updated Cmdlets

  • Update-LogicMonitorModule: Hardened for non-blocking version checks; failures are logged via Write-Verbose and never terminate connecting cmdlets.
  • Export-LMDeviceData: CSV exports now expand datapoints into individual rows and JSON exports capture deeper datapoint structures.
  • Set-LMWebsite: Added alertExpr alias for SSLAlertThresholds parameter for improved API compatibility. Updated synopsis to reflect enhanced parameter validation.
  • New-LMWebsite: Added alertExpr alias for SSLAlertThresholds parameter for improved API compatibility.
  • Format-LMFilter: Enhanced filter string escaping to properly handle special characters like parentheses, dollar signs, ampersands, and brackets in filter expressions.

Bug Fixes

  • Add-ObjectTypeInfo: Fixed "Cannot bind argument to parameter 'InputObject' because it is null" error by adding [AllowNull()] attribute to handle successful but null API responses.
  • Resolve-LMDebugInfo: Improved HTTP method detection logic to correctly identify request types (GET, POST, PATCH, DELETE) based on cmdlet naming conventions and headers, fixing incorrect debug output.
  • Invoke-LMRestMethod: Added cleanup of internal __LMMethod diagnostic header before dispatching requests to prevent API errors.

Examples

# Retrieve all recently deleted devices for the past seven days
Get-LMRecentlyDeleted -ResourceType device -DeletedBy "lmsupport" -Verbose

# Restore a previously deleted device and confirm the operation
Get-LMRecentlyDeleted -ResourceType device | Select-Object -First 1 -ExpandProperty id | Restore-LMRecentlyDeleted -Confirm:$false

# Permanently remove stale recycle-bin entries
Get-LMRecentlyDeleted -DeletedAfter (Get-Date).AddMonths(-1) | Select-Object -ExpandProperty id | Remove-LMRecentlyDeleted -Confirm:$false

# Export device datapoints to CSV with flattened datapoint rows
Export-LMDeviceData -DeviceId 12345 -StartDate (Get-Date).AddHours(-6) -ExportFormat csv -ExportPath "C:\\Exports"

# Retrieve all integrations
Get-LMIntegration

# Remove an integration by name
Remove-LMIntegration -Name "Slack-Integration"

# Remove an escalation chain by ID
Remove-LMEscalationChain -Id 123

# Trigger a report execution and check its status
$task = Invoke-LMReportExecution -Name "Monthly Availability" -WithAdminId 101 -ReceiveEmails "ops@example.com"
Get-LMReportExecutionTask -ReportName "Monthly Availability" -TaskId $task.taskId

# Use the universal API request cmdlet for endpoints
Invoke-LMAPIRequest -ResourcePath "/setting/integrations" -Method GET -QueryParams @{ size = 500 }

# Create a device with full control
$customData = @{
    name = "1.1.1.1"
    displayName = "Custom Device"
    preferredCollectorId = 76
    deviceType = 0
    customProperties = @(
        @{name="propname";value="value"}
    )
}
Invoke-LMAPIRequest -ResourcePath "/device/devices" -Method POST -Data $customData -Version 3

- expand json depth to 5 and tweak export details for CSV so datapoints are individual columns
@stevevillardi stevevillardi linked an issue Oct 29, 2025 that may be closed by this pull request
@stevevillardi stevevillardi changed the title Develop 7 7 0 v7.7.0 - pre-release Oct 29, 2025
When using get-lmwebsite, there is a property called alertExpr. However, that doesn't appear anywhere on the documentation page. In this set-lmwebsite command, it's referred to as -SSLAlertThresholds. If a note could be added somewhere letting us know that those are the same thing, that'd be great.
- Add Invoke-LMReportExecution
- Add Get-LMReportExecutionTask
- Fix 'Cannot bind argument to parameter 'InputObject' because it is null' bug when a response is successful but null
- Fix -Debug incorrectly in certain situations indicating a GET request as DELETE
### New Cmdlets
- **Get-LMIntegration**: Retrieve integration configurations from LogicMonitor.
- **Remove-LMIntegration**: Remove integrations by ID or name.
- **Remove-LMEscalationChain**: Remove escalation chains by ID or name.
This was linked to issues Oct 30, 2025
@stevevillardi stevevillardi merged commit 85ec5b3 into main Oct 30, 2025
2 checks passed
@stevevillardi stevevillardi deleted the develop-7-7-0 branch October 31, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment