Skip to content

Commit 8b1ff37

Browse files
authored
Add email type when retrieving custom variables (#174)
1 parent 519a117 commit 8b1ff37

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

ServiceNow/Private/Get-ServiceNowAuth.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ function Get-ServiceNowAuth {
1111

1212
[OutputType([Hashtable])]
1313
[CmdletBinding()]
14+
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSAvoidUsingConvertToSecureStringWithPlainText', '', Justification = 'requirement of azure automation')]
15+
1416
Param (
1517
[Parameter()]
1618
[Alias('C')]
@@ -37,7 +39,7 @@ function Get-ServiceNowAuth {
3739
else {
3840
$hashOut.Credential = $ServiceNowSession.Credential
3941
}
40-
42+
4143
if ( $ServiceNowSession.Proxy ) {
4244
$hashOut.Proxy = $ServiceNowSession.Proxy
4345
if ( $ServiceNowSession.ProxyCredential ) {

ServiceNow/Private/Invoke-ServiceNowRestMethod.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ function Invoke-ServiceNowRestMethod {
1515

1616
[OutputType([System.Management.Automation.PSCustomObject])]
1717
[CmdletBinding(SupportsPaging)]
18+
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseBOMForUnicodeEncodedFile', '', Justification = 'issuees with *nix machines and no benefit')]
19+
1820
Param (
1921
[parameter()]
2022
[ValidateSet('Get', 'Post', 'Patch', 'Delete')]

ServiceNow/Public/Get-ServiceNowRecord.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ function Get-ServiceNowRecord {
298298
$customVarParams = @{
299299
Table = 'sc_item_option_mtom'
300300
Property = 'sc_item_option.item_option_new.name', 'sc_item_option.item_option_new.sys_name', 'sc_item_option.item_option_new.type'
301-
Filter = @('request_item', '-eq', $record.sys_id), 'and', @('sc_item_option.item_option_new.type', '-in', '1,2,3,4,5,6,7,8,9,10,16,18,21,22')
301+
Filter = @('request_item', '-eq', $record.sys_id), 'and', @('sc_item_option.item_option_new.type', '-in', '1,2,3,4,5,6,7,8,9,10,16,18,21,22,26')
302302
First = 1000 # hopefully there isn't more custom vars than this, but we need to overwrite the default of 10
303303
}
304304
$customVars = Get-ServiceNowRecord @customVarParams

ServiceNow/Public/New-ServiceNowQuery.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#>
6464
function New-ServiceNowQuery {
6565

66-
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', 'No state is actually changing')]
66+
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'No state is actually changing')]
6767

6868
[CmdletBinding()]
6969
[OutputType([System.String])]

ServiceNow/Public/New-ServiceNowSession.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ https://docs.servicenow.com/bundle/quebec-platform-administration/page/administe
6868
function New-ServiceNowSession {
6969

7070
[CmdletBinding(DefaultParameterSetName = 'BasicAuth')]
71+
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSAvoidUsingConvertToSecureStringWithPlainText', '', Justification = 'api call provides in plain text')]
72+
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'No state is actually changing')]
7173

7274
param(
7375
[Parameter(Mandatory)]

0 commit comments

Comments
 (0)