@@ -86,13 +86,15 @@ Attempts to update packages, features, and system.
8686# Requires -Version 3
8787[Diagnostics.CodeAnalysis.SuppressMessageAttribute (' PSAvoidUsingWriteHost' , ' ' ,
8888Justification= ' This script is not intended for pipelining.' )]
89+ [Diagnostics.CodeAnalysis.SuppressMessageAttribute (' PSUseSingularNouns' , ' ' ,
90+ Justification= ' Some of these functions may deal with multiple updates.' )]
8991[CmdletBinding ()] Param (
9092# The sources of updates to install, in order.
9193[ValidateSet (' Chocolatey' , ' DellCommand' , ' Dotnet' , ' Essential' , ' GitHubCli' , ' Npm' , ' ScriptsData' ,
92- ' PSHelp' , ' PSModule' , ' Scoop' , ' WindowsUpdate' , ' WindowsStore' , ' WinGet' )]
94+ ' PSHelp' , ' PSModule' , ' Scoop' , ' VSCodeExtenions ' , ' WindowsUpdate' , ' WindowsStore' , ' WinGet' )]
9395[Parameter (Position = 0 , ValueFromRemainingArguments = $true )][string []] $Steps =
94- @ (' Essential' , ' WindowsStore' , ' Scoop' , ' Chocolatey' , ' WinGet' , ' Npm' , ' Dotnet' ,
95- ' GitHubCli ' , ' ScriptsData' , ' PSModule' , ' PSHelp' , ' DellCommand' , ' WindowsUpdate' )
96+ @ (' Essential' , ' WindowsStore' , ' Scoop' , ' Chocolatey' , ' WinGet' , ' Npm' , ' Dotnet' , ' GitHubCli ' ,
97+ ' VSCodeExtensions ' , ' ScriptsData' , ' PSModule' , ' PSHelp' , ' DellCommand' , ' WindowsUpdate' )
9698)
9799Begin
98100{
@@ -220,6 +222,14 @@ Begin
220222 gh extension upgrade -- all
221223 }
222224
225+ function Update-VSCodeExtenions
226+ {
227+ if (! (Get-Command code - ErrorAction Ignore))
228+ {Write-Verbose ' VSCode not found, skipping.' ; return }
229+ Write-Step " $UP Updating VSCode extensions"
230+ code -- update-extensions
231+ }
232+
223233 function Update-PSModule
224234 {
225235 Write-Step " $UP Updating PowerShell modules"
0 commit comments