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.
# Name of the table we're querying (e.g. incidents)
20
20
[parameter(Mandatory=$true)]
@@ -27,7 +27,7 @@ function Get-ServiceNowTable {
27
27
28
28
# Maximum number of records to return
29
29
[Parameter(Mandatory=$false)]
30
-
[int]$Limit=10,
30
+
[int]$Limit,
31
31
32
32
# Fields to return
33
33
[Parameter(Mandatory=$false)]
@@ -72,8 +72,48 @@ function Get-ServiceNowTable {
72
72
throw"Exception: You must do one of the following to authenticate: `n 1. Call the Set-ServiceNowAuth cmdlet `n 2. Pass in an Azure Automation connection object `n 3. Pass in an endpoint and credential"
73
73
}
74
74
75
+
$Body=@{'sysparm_display_value'=$DisplayValues}
76
+
77
+
# Handle paging parameters
78
+
# If -Limit was provided, write a warning message, but prioritize it over -First.
79
+
# The value of -First defaults to [uint64]::MaxValue if not specified.
80
+
# If no paging information was provided, default to the legacy behavior, which was to return 10 records.
81
+
82
+
if ($PSBoundParameters.ContainsKey('Limit')) {
83
+
Write-Warning"The -Limit parameter is deprecated, and may be removed in a future release. Use the -First parameter instead."
0 commit comments