Update-PSModules.ps1
<#PSScriptInfo .VERSION 1.0.3 .GUID 3187ed58-720b-4e9c-b3c2-707c00842fdf .AUTHOR Jimmy Briggs .COMPANYNAME jimbrig .COPYRIGHT Jimmy Briggs | 2023 .TAGS PowerShell Modules Management Utility Update Cleanup .LICENSEURI https://github.com/jimbrig/PSScripts/blob/main/LICENSE .PROJECTURI https://github.com/jimbrig/PSScripts/tree/main/Update-PSModules .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES Test-IsAdmin.ps1,Update-Modules.ps1 .RELEASENOTES 1.0.3 Fixed Project URL 1.0.2 Added Code Signing Certificate Signature 1.0.1 Added Test-IsAdmin.ps1 and Update-Modules.ps1 to .EXTERNALSCRIPTDEPENDENCIES 1.0.0 Initial Release .PRIVATEDATA #> <# .SYNOPSIS Updates PowerShell Modules. .DESCRIPTION A script for updating and cleaning up old versions of your installed PowerShell Modules. .EXAMPLE .\Update-PSModules.ps1 # Updates Modules. .PARAMETER AllowPrerelease Allows the script to update to prerelease versions of modules. #> [CmdletBinding()] Param ( [Parameter(Mandatory=$false)] [switch]$AllowPrerelease ) $ErrorActionPreference = 'Stop' $ScriptRoot = Split-Path $MyInvocation.MyCommand.Path . "$ScriptRoot\Test-IsAdmin.ps1" . "$ScriptRoot\Update-Modules.ps1" If ($AllowPrerelease) { Update-Modules -AllowPreRelease } Else { Update-Modules } # SIG # Begin signature block # MIIbsQYJKoZIhvcNAQcCoIIbojCCG54CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDIbuk9VB/ZVM5X # hdcmiEi8Hp6Kwld63d2hMmQ0l1xV36CCFgcwggL8MIIB5KADAgECAhB+/UWa6VZ/ # pk89wo9qoFZLMA0GCSqGSIb3DQEBCwUA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