PowerShell_Scripts/base/profile.d/Test-MyModules.ps1
lksz 6d2a23ae04 Modify Setup, Path, added Get-MyModules
+ base/Get-MyModules added
* base/profile.d/Test-MyModules modified to use Get-MyModules
* Setup-Profile modified so that sudo witll preserve environment
* Get-Path fixed bug introduced in last commit, Get-Path would fail when
  file to be edited didn't exist
2021-02-19 19:22:46 -05:00

13 lines
313 B
PowerShell

param([switch]$Force)
if( -not $global:MyModulesWarning -or $Force ) {
$global:MyModulesWarning = @()
}
Get-MyModules -MissingOnly |
Where-Object {
$_ -notin $global:MyModulesWarning
} | ForEach-Object {
$global:MyModulesWarning += $_
Write-Warning "Missing module: $_"
}