2020-11-09 18:06:17 +00:00
|
|
|
param([switch]$Force)
|
|
|
|
|
|
|
|
if( -not $global:MyModulesWarning -or $Force ) {
|
2020-11-05 05:29:04 +00:00
|
|
|
$global:MyModulesWarning = @()
|
|
|
|
}
|
2021-02-18 17:27:50 +00:00
|
|
|
|
2021-02-20 00:22:46 +00:00
|
|
|
Get-MyModules -MissingOnly |
|
|
|
|
Where-Object {
|
|
|
|
$_ -notin $global:MyModulesWarning
|
2020-11-05 05:29:04 +00:00
|
|
|
} | ForEach-Object {
|
|
|
|
$global:MyModulesWarning += $_
|
|
|
|
Write-Warning "Missing module: $_"
|
2021-02-18 17:27:50 +00:00
|
|
|
}
|