v3 - Major release
Hi all. A lot of work went into this release and I hope it's useful. There are some breaking changes, but I've tried to keep them to a minimum as I move through some cleanup and consolidation. Please let me know if you find the new functionality helpful or any issues you might find given the number of changes.
- New functionality in
Get-ServiceNowRecord
- Add
Id
property to easily retrieve a record by either number or sysid. - Add
ParentId
property to easily retrieve records based on the parent number or sysid. For example, to retrieve catalog tasks associated with a requested item executeGet-ServiceNowRecord -Table 'Catalog Task' -ParentId RITM01234567
. - Add
Description
property to retrieve records based on a table specific description field. For many tables this field will be short_description, but will be different for others. For example, when performing this against the 'User' table, the description field is 'Name'. - Add ability to provide a known prefixed
Id
without providingTable
,Get-ServiceNowRecord -Id inc0010001
. To see the list of known prefixes, execute$ServiceNowTable.NumberPrefix
after importing the module. - Add alias
gsnr
. With the above change, a Get can be as simple asgsnr inc0010001
.
- Add
- Add autocomplete for
Table
parameter inAdd-ServiceNowAttachment
andGet-ServiceNowAttachment
. - Add
Id
parameter toAdd-ServiceNowAttachment
andUpdate-ServiceNowRecord
which accepts either number or sysid. Just as withGet-ServiceNowRecord
you can now provide justId
if it has a known prefix. - Add ability to
Get-ServiceNowAttachment
to get attachments either via associated record or directly from the attachments table when you want to search all attachments. - Add advanced filtering and sorting functionality to
Get-ServiceNowAttachment
which can be really useful when searching across the attachments table. - Convert access and refresh tokens in $ServiceNowSession from plain text to a credential for added security.
- Pipeline enhancements added in many places.
- Add Change Task and Attachments to formats.
Update-ServiceNowNumber
has been deprecated and the functionality has been added toUpdate-ServiceNowRecord
. An alias has also been added so existing scripts do not break.- Prep for removal of all
Get-
functions except forGet-ServiceNowRecord
andGet-ServiceNowAttachment
. Table specific Get functions have been deprecated.Get-ServiceNowRecordInterim
has been created and all table specific Get functions have been aliased so existing scripts do not break. Please start to migrate toGet-ServiceNowRecord
as these functions will all be deprecated in the near future. - As communicated in v2.0, authentication cleanup has occurred. This involves removal of Credential/Url authentication in each function in favor of
ServiceNowSession
. You can still authenticate with Credential/Url, but must useNew-ServiceNowSession
.Set-ServiceNowAuth
,Remove-ServiceNowAuth
, andTest-ServiceNowAuthIsSet
have been deprecated. - Breaking change: rename
Get-ServiceNowAttachmentDetail
toGet-ServiceNowAttachment
. - Breaking change: rename
Get-ServiceNowAttachment
toExport-ServiceNowAttachment
. - Breaking change:
Get-ServiceNowTable
andGet-ServiceNowTableEntry
have been deprecated. UseGet-ServiceNowRecord
.