|
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: $_"
|
|
}
|