You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PowerShell module provides a series of cmdlets for interacting with the [ServiceNow REST API](http://wiki.servicenow.com/index.php?title=REST_API), performed by wrapping `Invoke-RestMethod` for the API calls.
This PowerShell module provides a series of cmdlets for interacting with the [ServiceNow REST API](http://wiki.servicenow.com/index.php?title=REST_API), performed by wrapping `Invoke-RestMethod` for the API calls.
6
+
4
7
**IMPORTANT:** Neither this module nor its creator are in any way affiliated with ServiceNow.
5
8
9
+
## Version 2 Overview
10
+
11
+
The module has been renamed from PSServiceNow to ServiceNow for version 2. This change moves us away from the reserved "PS" prefix. In addition to the name change the following high level changes have been made:
12
+
13
+
Back End:
14
+
15
+
* The module structure has been updated to individual files for each function.
16
+
* The build process has been migrated from MAKE to psake with support of the BuildHelpers module.
17
+
* Pester testing has been expanded to cover more scenarios.
The gains are marginal in some aspects, but may allow for better management in the future including setting the stage for the ability to use AppVeyor & PSDeploy.
21
+
22
+
Front End:
23
+
24
+
* The following fields are now returned in the DateTime format instead of string: 'closed_at','expected_start','follow_up','opened_at','sys_created_on','sys_updated_on','work_end','work_start'
25
+
* The formatting of returned data has been updated across all the `Get` functions except `Get-ServiceNowTable`. This means you'll see a handful of default properties returned and can use `Format-List` or `Select-Object` to view all other properties associated with the object.
26
+
27
+
Thse changes should improve your ability to filter on the right, especially by DateTime, as well as return more information in general.
28
+
6
29
## Requirements
30
+
7
31
Requires PowerShell 3.0 or above as this is when `Invoke-RestMethod` was introduced.
8
32
9
33
## Usage
10
-
Download the [latest release](https://github.com/Sam-Martin/servicenow-powershell/releases/latest) 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:
11
-
`Import-Module ServiceNow`
34
+
35
+
Download the [latest release](https://github.com/Sam-Martin/servicenow-powershell/releases/latest) 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:
36
+
`Import-Module ServiceNow`
12
37
Once you've done this, all the cmdlets will be at your disposal, you can see a full list using `Get-Command -Module ServiceNow`.
13
38
14
39
### Example - Retrieving an Incident Containing the Word 'PowerShell'
The module can use the `Connection` parameter in conjunction with the included `ServiceNow-Automation.json` file for use as an Azure automation integration module. Details of the process is available at [Authoring Integration Modules for Azure Automation](https://azure.microsoft.com/en-us/blog/authoring-integration-modules-for-azure-automation).
62
+
63
+
The module can use the `Connection` parameter in conjunction with the included `ServiceNow-Automation.json` file for use as an Azure automation integration module. Details of the process is available at [Authoring Integration Modules for Azure Automation](https://azure.microsoft.com/en-us/blog/authoring-integration-modules-for-azure-automation).
35
64
36
65
The `Connection` parameter accepts a hashtable object that requires a username, password, and ServiceNowURL.
37
66
38
-
## Cmdlets
67
+
## Cmdlets
68
+
39
69
* Get-ServiceNowChangeRequest
40
70
* Get-ServiceNowConfigurationItem
41
71
* Get-ServiceNowIncident
@@ -54,11 +84,13 @@ The `Connection` parameter accepts a hashtable object that requires a username,
54
84
* Update-ServiceNowTableEntry
55
85
56
86
## Tests
87
+
57
88
This module comes with [Pester](https://github.com/pester/Pester/) tests for unit testing.
58
89
59
90
## Scope & Contributing
91
+
60
92
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.
0 commit comments