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.
6
6
@@ -16,28 +16,6 @@ Building on the great work the community has done thus far, a lot of new updates
16
16
- Pipeline support added to many functions
17
17
- Standardizing on coding between all functions
18
18
19
-
## Version 1
20
-
21
-
The module has been renamed from PSServiceNow to ServiceNow for version 1. This change moves us away from the reserved "PS" prefix. Since the name change is a major change for the user base and the project was never incremented to v1 we've taken the opportunity to label it such.
22
-
23
-
In addition to the name change the following high level changes have been made:
24
-
25
-
Back End:
26
-
27
-
* The module structure has been updated to individual files for each function.
28
-
* The build process has been migrated from MAKE to psake with support of the BuildHelpers module.
29
-
* Pester testing has been expanded to cover more scenarios.
The gains are marginal in some aspects, but intended to allow for better management in the future.
33
-
34
-
Front End:
35
-
36
-
* 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' [v1.0.1 Update: This process now attempts to format the property as DateTime based off your local culture settings, a universal `yyyy-MM-dd HH:mm:ss` format, and finally leaves the property as a string if those two convert attempts fail].
37
-
* 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.
38
-
39
-
These changes should improve your ability to filter on the right, especially by DateTime, as well as return more information in general.
40
-
41
19
## Requirements
42
20
43
21
Requires PowerShell 3.0 or above as this is when `Invoke-RestMethod` was introduced.
@@ -50,38 +28,26 @@ Requires authorization in your ServiceNow tenant. Due to the custom nature of S
50
28
51
29
## Usage
52
30
53
-
Download the [latest release](https://github.com/Snow-Shell/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:
54
-
`Import-Module ServiceNow`
55
-
Once you've done this, all the cmdlets will be at your disposal, you can see a full list using `Get-Command -Module ServiceNow`.
31
+
The ServiceNow module should be installed from the PowerShell Gallery with `install-module ServiceNow`.
The URL should be the instance name portion of the FQDN for your instance. If you browse to `https://yourinstance.service-now.com` the URL required for the module is `yourinstance.service-now.com`.
39
+
This example is using basic authentication, but OAuth is available as well; see the built-in help for `New-ServiceNowSession`. All examples below assume a new session has already been created.
64
40
65
41
### Example - Retrieving an Incident Containing the Word 'PowerShell'
### Example - Creating a Incident with custom table entries
@@ -102,41 +68,13 @@ The module can use the `Connection` parameter in conjunction with the included `
102
68
103
69
The `Connection` parameter accepts a hashtable object that requires a username, password, and ServiceNowURL.
104
70
105
-
## Functions
106
-
107
-
* Add-ServiceNowAttachment
108
-
* Get-ServiceNowAttachment
109
-
* Get-ServiceNowAttachmentDetail
110
-
* Get-ServiceNowChangeRequest
111
-
* Get-ServiceNowConfigurationItem
112
-
* Get-ServiceNowIncident
113
-
* Get-ServiceNowRequest
114
-
* Get-ServiceNowRequestItem
115
-
* Get-ServiceNowTable
116
-
* Get-ServiceNowTableEntry
117
-
* Get-ServiceNowUser
118
-
* Get-ServiceNowUserGroup
119
-
* New-ServiceNowChangeRequest
120
-
* New-ServiceNowIncident
121
-
* New-ServiceNowSession
122
-
* New-ServiceNowQuery
123
-
* New-ServiceNowTableEntry
124
-
* Remove-ServiceNowAttachment
125
-
* Remove-ServiceNowTableEntry
126
-
* Test-ServiceNowAuthIsSet
127
-
* Update-ServiceNowChangeRequest
128
-
* Update-ServiceNowIncident
129
-
* Update-ServiceNowNumber
130
-
* Update-ServiceNowRequestItem
131
-
* Update-ServiceNowTableEntry
132
-
133
71
## Tests
134
72
135
-
This module comes with [Pester](https://github.com/pester/Pester/) tests for unit testing.
73
+
This module comes with limited [Pester](https://github.com/pester/Pester/) tests for unit testing.
136
74
137
75
## Scope & Contributing
138
76
139
-
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.
77
+
Contributions are gratefully received, so please feel free to submit a pull request with additional features or amendments.
0 commit comments