PowerShell Abstraction Layer for SolarWinds Service Desk REST API
A comprehensive PowerShell module providing an abstraction layer for the SolarWinds Service Desk (SwSD) REST API. This module simplifies interaction with Service Desk through PowerShell cmdlets, focusing primarily on incident (ticket) management. Just because I could, not that I should.
This module is built to streamline SolarWinds Service Desk operations through PowerShell automation. It was created for my own needs, but further development will be based upon general interest and feedback. If you find something that needs fixing, improving, or adding, drop a new Issue here. Thank you!
NOTE: If you installed version 1.0.4 or 1.0.5, I apologize. It was a bad hair day.
- π« Incident Management - Create, update, query, and export Service Desk incidents
- π Task Management - Create, update, and remove tasks associated with incidents
- π¬ Comments & Audit Logs - Add comments to tickets and query audit logs
- π₯ User & Group Management - Query users, groups, and group memberships
- π’ Organization Data - Access departments, sites, vendors, and roles
- π» Asset Management - Query hardware, mobile devices, printers, and other assets
- π¦ Service Catalog - Browse catalog categories and items
- π Incident Links - Manage relationships between incidents
- π οΈ Purchase Orders - Query purchase order information
- π Problem Management - Access problem records
- PowerShell 5.1 or higher (tested primarily on 7.5.1)
- Windows, Linux, or MacOS
- Active SolarWinds Service Desk subscription
- Valid API token for authentication
Install-Module -Name SolarWinds.ServiceDesk -Scope CurrentUser
# or PowerShell 7.x
Install-PSResource -Name SolarWinds.ServiceDesk- Clone the repository
git clone https://github.com/Skatterbrainz/SolarWinds.ServiceDesk.git
cd SolarWinds.ServiceDesk- Import the module
Import-Module ./SolarWinds.ServiceDesk.psd1Import the module and explore available cmdlets:
# Import the module
Import-Module SolarWinds.ServiceDesk
# Get all available cmdlets
Get-Command -Module SolarWinds.ServiceDesk
# Get help for a specific cmdlet
Get-Help Connect-SwSd -Full
# Connect to Service Desk
Connect-SwSd -ApiToken "<YOUR TOKEN>"Connect to Service Desk using an explicit Token string
Connect-SwSd -ApiToken "<YOUR TOKEN>"Connect to Service Desk using an existing $env:SWSDToken variable
Connect-SwSdReturn a list of incidents by status and name
$incidents = Get-SwSdIncident -Status "Pending Assignment" -Name "Request for New User Account"Return information for a single incident
$incident = Get-SwSdIncident -Number 12345Update an incident to assign to a user
Update-SwSdIncident -Number 12345 -Status "Assigned" -Assignee "jsmith@contoso.com"Update an incident status to Closed
Update-SwSdIncident -Number 12345 -Status "Closed"Get Tasks related to an incident
Get-SwSdTask -IncidentNumber 12345Add a new Task to an incident
New-SwSdTask -IncidentNumber 12345 -Name "Assign Laptop" -Assignee "bjones@contoso.com" -DueDateOffsetDays 7Update a Task on an incident to set status to Completed
$task = Get-SwSdTask -IncidentNumber 12345 | Where-Object name -eq 'Assign Laptop'
Update-SwSdTask -TaskURL $task.href -Assignee "ctaylor@contoso.com" -CompletedFull documentation for each cmdlet is available in the docs directory:
- Connect-SwSd - Authenticate to Service Desk API
- Get-SwSdIncident - Query incident records
- New-SwSdIncident - Create new incidents
- Update-SwSdIncident - Update existing incidents
- Get-SwSdTask - Query tasks on incidents
- New-SwSdTask - Create new tasks
- And many more...
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features or cmdlets
- Add support for additional Service Desk APIs
- Improve documentation
- Submit pull requests
Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Skatterbrainz
- GitHub: @Skatterbrainz
- Built for PowerShell 5.1+ on Windows, Linux, and MacOS
- Inspired by the need to automate SolarWinds Service Desk operations
- Thanks to all contributors and users who have provided feedback and suggestions
- Added: Get-SwSdQueue
- Added queue retrieval by
IdandName - Added endpoint discovery/fallback behavior for queue-like records
- Added queue retrieval by
- Updated: Update-SwSdIncident
- Added
GroupAssigneeIdparameter (aliases:GroupId,QueueId) - Improved queue reassignment payload handling when switching from user assignee to queue assignee
- Added
- Updated: New-SwSdIncident
- Added
GroupAssigneeIdparameter (aliases:GroupId,QueueId) - Improved queue/group assignment handling during incident creation
- Added
- Updated: Get-SwSdUser
- Refactored to use
getApiListOrItempattern with optional email filtering
- Refactored to use
- Updated: Get-SwSdHardware
- Refactored to use
getApiListOrItempattern with optional name filtering
- Refactored to use
- Updated: Documentation
- Synced markdown help for
Get-SwSdUser,Get-SwSdHardware,Get-SwSdQueue,New-SwSdIncident, andUpdate-SwSdIncident
- Synced markdown help for
- Added: Add-SwSdGroupMember
- Added: New-SwSdGroup
- Updated: Get-SwSdAPI
- Added Force parameter to refresh API list cache;
- Implemented caching mechanism using $global:SDAPIList to minimize API calls
- Added Search API manually to the list (not included in API response)
- Fixed parsing of the JSON response
- Updated: Get-SwSdIncident
- Fixed returning unbounded queries (was being ignored)
- Added NamePattern parameter for searching by name values with wildcards
- Added PageLimit parameter (1-500 range, default 50) to control records per page
- Added PageCount parameter (0-100 range, default 5, use 0 for all pages) to limit number of pages returned
- Enhanced pagination support for large result sets
- Updated: Get-SwSdTask
- Improved error handling for task retrieval
- Enhanced verbose logging for task operations
- Updated: Get-SwSdGroup
- Added Id parameter to search by group ID
- Enhanced filtering to support both Name and ID parameters
- Fixed: New-SwSdIncident - Fixed bug with SDSession headers and default input parameters
- Fixed: Update-SwSdIncident - Fixed bug with SDSession headers and default input parameters
- Fixed: New-SwSdTask - Fixed bug with SDSession headers
- Updated: Get-SwSdIncident, Get-SwSdPurchaseOrder, Get-SwSdUser, (getAPIResponse, getAPIResponseByURL) - Added -UseBasicParsing to address CVE-2025-54100
- Updated: All functions - Added outputtype() and aliases
- Updated: Get-SwSdIncident - Added input parameter validation refinements
- Added: Get-SwSdAuditLog, Get-SwSdDepartment, Get-SwSdMobileDevice, Get-SwSdOtherAsset, Get-SwSdPrinter, Get-SwSdProblems, Get-SwSdPurchaseOrder, Get-SwSdSite, Get-SwSdVendor
- Updated: New-SwSDTask - Revised DueDateOffsetDays to DueDate and made the default null
- Updated: Update-SwSDTask - Updated help documentation
- Fixed: Get-SwSdTask - Fixed bug in parameter reference and corrected the response JSON data
- Updated: New-SwSdTask - Changed DueDateOffsetDays default from 14 to 7 days
- Updated: Update-SwSdTask - Added support for DueDate property
- Note: Still wondering why the Reminder property isn't exposed through the REST API
- Created: It was born. Cigars were smoked. Insurance was billed.