Skip to content

Commit

Permalink
Update Update-AllPowerShellModules.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienperez committed Aug 13, 2024
1 parent aff2147 commit 95f4b62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Update-AllPowerShellModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ if ($SimulationMode) {
Write-Host -ForegroundColor yellow 'Simulation mode is ON, nothing will be installed / removed / updated'
}

Write-Host -ForegroundColor Cyan 'Get all PowerShell modules'

function Remove-OldPowerShellModules {
param (
[string]$ModuleName,
Expand All @@ -67,9 +65,11 @@ function Remove-OldPowerShellModules {
}

if ($IncludedModules) {
Write-Host -ForegroundColor Cyan "Get PowerShell modules like $IncludedModules"
$modules = Get-InstalledModule | Where-Object { $_.Name -like $IncludedModules}
}
else {
Write-Host -ForegroundColor Cyan 'Get all PowerShell modules'
$modules = Get-InstalledModule
}

Expand Down

0 comments on commit 95f4b62

Please sign in to comment.