PowerShell - Modules and Script Organization
You want to import a module only if it is not already loaded in your PowerShell session. Which script snippet correctly does this?
-not (Get-Module -Name MyModule) checks if module is missing, then imports it.Import-Module MyModule -Force forces import regardless. Piping Get-Module output to Import-Module is invalid syntax. -SkipIfLoaded is not a valid parameter.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions