diff --git a/ServiceNow/Public/New-ServiceNowSession.ps1 b/ServiceNow/Public/New-ServiceNowSession.ps1 index 9ea2e78..20f5713 100644 --- a/ServiceNow/Public/New-ServiceNowSession.ps1 +++ b/ServiceNow/Public/New-ServiceNowSession.ps1 @@ -156,8 +156,8 @@ function New-ServiceNowSession { } } - $PSDefaultParameterValues['Invoke-WebRequest:TimeoutSec'] = $TimeoutSec - $PSDefaultParameterValues['Invoke-RestMethodt:TimeoutSec'] = $TimeoutSec + $script:PSDefaultParameterValues['Invoke-WebRequest:TimeoutSec'] = $TimeoutSec + $script:PSDefaultParameterValues['Invoke-RestMethodt:TimeoutSec'] = $TimeoutSec switch -Wildcard ($PSCmdLet.ParameterSetName) { 'OAuth*' {