Skip to content

Commit 95f4b62

Browse files
committed
Update Update-AllPowerShellModules.ps1
1 parent aff2147 commit 95f4b62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Update-AllPowerShellModules.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ if ($SimulationMode) {
4242
Write-Host -ForegroundColor yellow 'Simulation mode is ON, nothing will be installed / removed / updated'
4343
}
4444

45-
Write-Host -ForegroundColor Cyan 'Get all PowerShell modules'
46-
4745
function Remove-OldPowerShellModules {
4846
param (
4947
[string]$ModuleName,
@@ -67,9 +65,11 @@ function Remove-OldPowerShellModules {
6765
}
6866

6967
if ($IncludedModules) {
68+
Write-Host -ForegroundColor Cyan "Get PowerShell modules like $IncludedModules"
7069
$modules = Get-InstalledModule | Where-Object { $_.Name -like $IncludedModules}
7170
}
7271
else {
72+
Write-Host -ForegroundColor Cyan 'Get all PowerShell modules'
7373
$modules = Get-InstalledModule
7474
}
7575

0 commit comments

Comments
 (0)