Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions GitHubCore.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,15 @@ function Invoke-GHRestMethod
}
}

# Temporarily Disable Progress Bar during Invoke-WebRequest
$tempProgressPreference = $ProgressPreference
Comment thread
X-Guardian marked this conversation as resolved.
Outdated
$ProgressPreference = 'SilentlyContinue'

[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
$result = Invoke-WebRequest @params

$progressPreference = $tempProgressPreference

if ($Method -eq 'Delete')
{
Write-Log -Message "Successfully removed." -Level Verbose
Expand Down Expand Up @@ -265,8 +272,14 @@ function Invoke-GHRestMethod

try
{
# Temporarily Disable Progress Bar during Invoke-WebRequest
$tempProgressPreference = $ProgressPreference
Comment thread
X-Guardian marked this conversation as resolved.
Outdated
$ProgressPreference = 'SilentlyContinue'

[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
Invoke-WebRequest @params

$progressPreference = $tempProgressPreference
}
catch [System.Net.WebException]
{
Expand Down