One of the new features in PowerShell 3.0 is the Auto Loading of Modules.
This feature is great for discovering commands, but can be really annoing when trying to test if your script works as it is supposed to.
Luckily we can change the settings using an automatic variable.
$PSModuleAutoloadingPreference
Here is the info from the help:
$PSModuleAutoloadingPreference
——————————
Enables and disables automatic importing of modules in the session.
“All” is the default. Regardless of the value of this variable, you
can use the Import-Module cmdlet to import a module.
Valid values are:
All Modules are imported automatically on first-use. To import a
module, get (Get-Command) or use any command in the module.
ModuleQualified
Modules are imported automatically only when a user uses the
module-qualified name of a command in the module. For example,
if the user types “MyModule\MyCommand”, Windows PowerShell
imports the MyModule module.
None Automatic importing of modules is disabled in the session. To
import a module, use the Import-Module cmdlet.
For more information about automatic importing of modules, see about_Modules
(http://go.microsoft.com/fwlink/?LinkID=144311).
For more information, see about_Modules, about_Preference_Variables,