Skip to content

Commit 9a64317

Browse files
authored
update example with date
1 parent 0c9d6c8 commit 9a64317

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

Readme.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@ This PowerShell module provides a series of cmdlets for interacting with the [Se
88

99
**IMPORTANT:** Neither this module nor its creator are in any way affiliated with ServiceNow.
1010

11-
## Version 2
12-
13-
Building on the great work the community has done thus far, a lot of new updates with this release.
14-
- Although still in the module for backward compatibility, `Set-ServiceNowAuth` is being replaced with `New-ServiceNowSession`. With this comes OAuth support, removal of global variables, and much more folks have asked for. The ability to provide credentials directly to functions has been retained for this release, but will be deprecated in a future release in favor of using `New-ServiceNowSession`.
15-
- Support for different api versions. `Set-ServiceNowAuth` will continue to use v1 of the api, but `New-ServiceNowSession` defaults to the latest. Check out the `-ApiVersion` parameter of `New-ServiceNowSession`.
16-
- `Remove-ServiceNowAuth` has been retained for this release, but as global variables have been removed, there is no longer a need for it; it will always return `$true`. It will be removed in a future release.
17-
- `-PassThru` added to remaining `Update-` and `New-` functions. Depending on your code, this may be a ***breaking change*** if you expected the result to be returned.
18-
- Pipeline support added to many functions
19-
- Standardizing on coding between all functions
20-
21-
***It is recommended to use `Get-ServiceNowRecord` instead of the other 'Get' functions.***
22-
2311
## Requirements
2412

2513
Requires PowerShell 5.1 or above.
@@ -32,7 +20,7 @@ Requires authorization in your ServiceNow tenant. Due to the custom nature of S
3220

3321
## Usage
3422

35-
The ServiceNow module should be installed from the PowerShell Gallery with `install-module ServiceNow`.
23+
The ServiceNow module should be installed from the [PowerShell Gallery](https://www.powershellgallery.com/packages/ServiceNow) with `install-module ServiceNow`.
3624

3725
### Creating a new session
3826

@@ -61,7 +49,7 @@ All examples below assume a new session has already been created.
6149

6250
### Getting incidents opened in the last 30 days
6351
```PowerShell
64-
$filter = @('opened_at', '-ge', 'javascript:gs.daysAgoEnd(30)')
52+
$filter = @('opened_at', '-ge', (Get-Date).AddDays(-30))
6553
Get-ServiceNowRecord -Table incident -Filter $filter
6654
```
6755

@@ -95,10 +83,6 @@ The module can use the `Connection` parameter in conjunction with the included `
9583

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

98-
## Tests
99-
100-
This module comes with limited [Pester](https://github.com/pester/Pester/) tests for unit testing.
101-
10286
## Scope & Contributing
10387

10488
Contributions are gratefully received, so please feel free to submit a pull request with additional features or amendments.

0 commit comments

Comments
 (0)