Skip to content

This PowerShell module provides a series of cmdlets for interacting with the ServiceNow REST API

License

Notifications You must be signed in to change notification settings

elcooper/servicenow-powershell

 
 

Repository files navigation

PSServiceNow

GitHub release GitHub license Test Coverage
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.

Requirements

Requires PowerShell 3.0 or above as this is when Invoke-RestMethod was introduced.

Usage

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.

Example - Retrieving an Incident Containing the Word 'PowerShell'

Import-Module PSServiceNow
Set-ServiceNowAuth 
Get-ServiceNowIncident -MatchContains @{short_description='PowerShell'} 

Cmdlets

  • 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

Tests

This module comes with Pester tests for unit testing.

Scope & Contributing

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

Author:: Sam Martin ([email protected])

About

This PowerShell module provides a series of cmdlets for interacting with the ServiceNow REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PowerShell 100.0%