Skip to content

Instantly share code, notes, and snippets.

View tcartwright's full-sized avatar

Tim Cartwright tcartwright

  • Houston, Texas
View GitHub Profile
<# download and install Solarwinds SentryOne Plan Explorer #>
$filenamePlanExplorerInstall = "$env:USERPROFILE\downloads\" + ([string](Get-Date -format "yyyy-MM-dd")) + "_SolarWinds-PlanExplorer.exe"
Start-BitsTransfer -Source 'https://downloads.solarwinds.com/solarwinds/Release/FreeTool/SolarWinds-PlanExplorer.exe' -Destination $filenamePlanExplorerInstall
& $filenamePlanExplorerInstall /install /passive /norestart
# https://4bes.nl/2021/09/19/update-all-powershell-modules-on-a-system/
<#
TIM C: Changes:
- Added scope parameter so scope could be controlled
- altered code to always check for old versions, as this script may not have done the install, but it can still remove old versions
- changed contains and othercomparison syntax to be case insensitive
- altered logic around when the module is not found in the gallery to make the verbose output clearer
- added version parses around the version compares so string comparisons do not screw up the comparison
- added admin check when using AllUsers