This PowerShell module provides a series of cmdlets for interacting with the ServiceNow REST API, performed by wrapping Invoke-RestMethod
for the API calls.
IMPORTANT: Neither this module, nor its creator are in any way affiliated with ServiceNow.
Requires PowerShell 3.0 or above as this is when Invoke-RestMethod
was introduced.
Download the latest release and extract the .psm1 and .psd1 files to your PowerShell profile directory (i.e. the Modules
directory under wherever $profile
points to in your PS console) and run:
Import-Module PSServiceNow
Once you've done this, all the cmdlets will be at your disposal, you can see a full list using Get-Command -Module PSServiceNow
.
Import-Module PSServiceNow
Set-ServiceNowAuth
Get-ServiceNowIncident -MatchContains @{short_description='PowerShell'}
- Get-ServiceNowChangeRequest
- Get-ServiceNowConfigurationItem
- Get-ServiceNowIncident
- Get-ServiceNowTable
- Get-ServiceNowUser
- Get-ServiceNowUserGroup
- New-ServiceNowIncident
- New-ServiceNowQuery
- New-ServiceNowTableEntry
- Remove-ServiceNowAuth
- Remove-ServiceNowTableEntry
- Set-ServiceNowAuth
- Test-ServiceNowAuthIsSet
This module comes with Pester tests for unit testing.
This module has been created as an abstraction layer to suit my immediate requirements. Contributions are gratefully received however, so please feel free to submit a pull request with additional features or amendments.
Author:: Sam Martin ([email protected])