Skip to content

Commit 1736ccf

Browse files
Add -Fields parameter to remaining Get functions
1 parent 52737e7 commit 1736ccf

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

ServiceNow/Public/Get-ServiceNowTableEntry.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ function Get-ServiceNowTableEntry {
3838
[parameter(Mandatory = $false)]
3939
[int]$Limit = 10,
4040

41+
# Fields to return
42+
[parameter(mandatory = $false)]
43+
[string[]]$Fields,
44+
4145
# Hashtable containing machine field names and values returned must match exactly (will be combined with AND)
4246
[parameter(Mandatory = $false)]
4347
[hashtable]$MatchExact = @{},
@@ -82,6 +86,7 @@ function Get-ServiceNowTableEntry {
8286
Table = $Table
8387
Query = $Query
8488
Limit = $Limit
89+
Fields = $Fields
8590
DisplayValues = $DisplayValues
8691
ErrorAction = 'Stop'
8792
}

ServiceNow/Public/Get-ServiceNowUser.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ function Get-ServiceNowUser{
1515
[Parameter(Mandatory = $false)]
1616
[int]$Limit = 10,
1717

18+
# Fields to return
19+
[parameter(mandatory = $false)]
20+
[string[]]$Fields,
21+
1822
# Hashtable containing machine field names and values returned must match exactly (will be combined with AND)
1923
[Parameter(Mandatory = $false)]
2024
[hashtable]$MatchExact = @{},
@@ -57,6 +61,7 @@ function Get-ServiceNowUser{
5761
Table = 'sys_user'
5862
Query = $Query
5963
Limit = $Limit
64+
Fields = $Fields
6065
DisplayValues = $DisplayValues
6166
}
6267

ServiceNow/Public/Get-ServiceNowUserGroup.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ function Get-ServiceNowUserGroup{
1515
[Parameter(Mandatory = $false)]
1616
[int]$Limit = 10,
1717

18+
# Fields to return
19+
[parameter(mandatory = $false)]
20+
[string[]]$Fields,
21+
1822
# Hashtable containing machine field names and values returned must match exactly (will be combined with AND)
1923
[Parameter(Mandatory = $false)]
2024
[hashtable]$MatchExact = @{},
@@ -57,6 +61,7 @@ function Get-ServiceNowUserGroup{
5761
Table = 'sys_user_group'
5862
Query = $Query
5963
Limit = $Limit
64+
Fields = $Fields
6065
DisplayValues = $DisplayValues
6166
}
6267

0 commit comments

Comments
 (0)