Private/Functions/ModulesInstalledTest.ps1
function Test-ModuleInstalled ([string]$modname) { $moduleinstalled = Get-Module -ListAvailable $modname Set-OutputColour "Green" "hecking $modname module is installed..." if (!($moduleinstalled)){ Set-OutputColour "Yellow" "$modname module is not installed. Installing now..." Install-Module -Name $modname -Force Import-Module $modname -Force } $MSTeamsSettings.$modname = "Installed" } |