Skip to content

Commit

Permalink
hide progress from Invoke-WebRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Jan 7, 2024
1 parent 2c1efad commit fb9759d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Module/ExoHelper/ExoHelper.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'ExoHelper.psm1'

# Version number of this module.
ModuleVersion = '1.0.2'
ModuleVersion = '1.0.3'

# Supported PSEditions
CompatiblePSEditions = @('Desktop', 'Core')
Expand Down
8 changes: 8 additions & 0 deletions Module/ExoHelper/ExoHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ This command retrieves mailbox of user JohnDoe and returns just netId property
$props = $PropertiesToLoad -join ','
$uri = "$uri`?`$select=$props"
}
#do not show progress from Invoke-WebRequest
$pref = $progressPreference
$progressPreference = 'SilentlyContinue'
}

process
Expand Down Expand Up @@ -208,4 +211,9 @@ This command retrieves mailbox of user JohnDoe and returns just netId property
}
}while($true)
}
end
{
#restore progress preference
$progressPreference = $pref
}
}

0 comments on commit fb9759d

Please sign in to comment.