Skip to content

Commit 203e12d

Browse files
committed
ReadMe Update
1 parent 05026fa commit 203e12d

File tree

1 file changed

+45
-13
lines changed

1 file changed

+45
-13
lines changed

Readme.md

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,71 @@
1-
# ServiceNow
2-
[![GitHub release](https://img.shields.io/github/release/Sam-Martin/servicenow-powershell.svg)](https://github.com/Sam-Martin/servicenow-powershell/releases/latest) [![GitHub license](https://img.shields.io/github/license/Sam-Martin/servicenow-powershell.svg)](LICENSE) ![Test Coverage](https://img.shields.io/badge/coverage-73%25-orange.svg)
3-
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.
1+
# ServiceNow
2+
3+
[![GitHub release](https://img.shields.io/github/release/Sam-Martin/servicenow-powershell.svg)](https://github.com/Sam-Martin/servicenow-powershell/releases/latest) [![GitHub license](https://img.shields.io/github/license/Sam-Martin/servicenow-powershell.svg)](LICENSE) ![Test Coverage](https://img.shields.io/badge/coverage-73%25-orange.svg)
4+
5+
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+
47
**IMPORTANT:** Neither this module nor its creator are in any way affiliated with ServiceNow.
58

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.
18+
* Improved code formatting, removed aliases, fixed file encoding.
19+
20+
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+
629
## Requirements
30+
731
Requires PowerShell 3.0 or above as this is when `Invoke-RestMethod` was introduced.
832

933
## 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`
1237
Once you've done this, all the cmdlets will be at your disposal, you can see a full list using `Get-Command -Module ServiceNow`.
1338

1439
### Example - Retrieving an Incident Containing the Word 'PowerShell'
15-
```
40+
41+
```PowerShell
1642
Import-Module ServiceNow
17-
Set-ServiceNowAuth
18-
Get-ServiceNowIncident -MatchContains @{short_description='PowerShell'}
43+
Set-ServiceNowAuth
44+
Get-ServiceNowIncident -MatchContains @{short_description='PowerShell'}
1945
```
2046

2147
### Example - Retrieving an Incident Containing the Word 'PowerShell' While Passing Authentication
22-
```
48+
49+
```PowerShell
2350
Import-Module ServiceNow
2451
Get-ServiceNowIncident -MatchContains @{short_description='PowerShell'} -ServiceNowCredential $PSCredential -ServiceNowURL $ServiceNowURL
2552
```
2653

2754
### Example - Update a Ticket
28-
```
55+
56+
```PowerShell
2957
$Incident = Get-ServiceNowIncident -Limit 1 -MatchContains @{short_description='PowerShell'}
3058
Update-ServiceNowIncident -SysID $Incident.Sys_ID -Values @{comments='Updated via PowerShell'}
3159
```
3260

3361
### Azure Connection Object (Automation Integration Module Support)
34-
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).
3564

3665
The `Connection` parameter accepts a hashtable object that requires a username, password, and ServiceNowURL.
3766

38-
## Cmdlets
67+
## Cmdlets
68+
3969
* Get-ServiceNowChangeRequest
4070
* Get-ServiceNowConfigurationItem
4171
* Get-ServiceNowIncident
@@ -54,11 +84,13 @@ The `Connection` parameter accepts a hashtable object that requires a username,
5484
* Update-ServiceNowTableEntry
5585

5686
## Tests
87+
5788
This module comes with [Pester](https://github.com/pester/Pester/) tests for unit testing.
5889

5990
## Scope & Contributing
91+
6092
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.
6193

6294
## Author
63-
Author:: Sam Martin (<samjackmartin@gmail.com>)
6495

96+
Author:: Sam Martin (<samjackmartin@gmail.com>)

0 commit comments

Comments
 (0)