---
title: "PowerShell 101: Importing Modules"
description: "Learn how to manage PowerShell modules like a pro! From importing and removing modules to troubleshooting common issues, master PowerShell modules in this complete guide."
canonical: "https://adamtheautomator.com/powershell-modules-guide-2/"
---

# PowerShell 101: Importing Modules

> Learn how to manage PowerShell modules like a pro! From importing and removing modules to troubleshooting common issues, master PowerShell modules in this complete guide.

Source: https://adamtheautomator.com/powershell-modules-guide-2/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![PowerShell 101: Importing Modules](https://adamtheautomator.com/wp-content/uploads/2025/01/featured-image-2.webp)

# PowerShell 101: Importing Modules

[![](https://secure.gravatar.com/avatar/d0b9d42e21e5622713f8b693aa5c0f9244d5f7dd200ed29b8398f52dee5de337?s=192&d=mm&r=g)Adam Bertram](https://adamtheautomator.com/author/adam-bertram/)17 January 20253 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[PowerShell](/tag/powershell/)

Table of Contents

*   [Checking Imported Modules](#checking-imported-modules)
*   [Importing Modules Automatically](#importing-modules-automatically)
*   [Removing and Re-importing Modules](#removing-and-re-importing-modules)
*   [Re-importing Modules After Changes](#re-importing-modules-after-changes)
*   [Conclusion](#conclusion)

Have you ever run a PowerShell command and received the dreaded “The term is not recognized as the name of a cmdlet” error message? Here’s the kicker: the problem could be as simple as a missing or unimported module. Even in modern PowerShell versions, understanding how modules work is key to diagnosing and fixing these issues.

The good news? This guide covers everything from checking which modules PowerShell currently imported to mastering how to import, remove, and re-import them. By the end, you’ll skill up on seamlessly managing PowerShell modules, whether troubleshooting unexpected errors or working on custom modules.

Dive in and let PowerShell modules help you optimize your workflow with confidence!

## Checking Imported Modules

PowerShell commands can fail with cryptic error messages when modules aren’t loaded properly. For example, trying to run Get-ADUser without first importing the ActiveDirectory module will result in a “command not found” error. Similarly, attempting to use Azure commands requires the Az module to be present in your session.

PowerShell must import the relevant module to ensure commands work as expected and make its commands available.

To view the currently imported modules, use:

```powershell
Get-Module
```

When you run Get-Module, you’ll see output similar to this:

```
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   7.0.0.0    Microsoft.PowerShell.Management    {Add-Computer, Add-Content, Checkpoint-Computer...}
Manifest   7.0.0.0    Microsoft.PowerShell.Utility       {Add-Member, Add-Type, Clear-Variable...}
Script     2.0.0      PSReadline                         {Get-PSReadLineKeyHandler, Get-PSReadLineOption...}
Binary     1.0.0.1    SmbShare                          {Get-SmbShare, Set-SmbShare, Remove-SmbShare...}
```

This displays a list of all currently loaded modules in your PowerShell session, showing their type (Manifest, Script, or Binary), version number, module name, and a summary of the commands they provide. The ExportedCommands column shows which cmdlets are available from each module.

Next, examine commands from a module that you can import:

```powershell
Get-Module -Name SmbShare -ListAvailable | Select exportedcommands
```

When you run this command, you’ll see output that lists all the available commands in the SmbShare module. For example:

```
ExportedCommands
----------------
{Get-SmbShare, New-SmbShare, Remove-SmbShare, Set-SmbShare, Get-SmbShareAccess, 
Grant-SmbShareAccess, Block-SmbShareAccess, Revoke-SmbShareAccess, Get-SmbMapping}
```

This output shows all the cmdlets you can use from the SmbShare module. Each command serves a specific purpose for managing SMB shares:

*   **Get-SmbShare**: Lists all SMB shares on the system
*   **New-SmbShare**: Creates a new SMB share
*   **Remove-SmbShare**: Deletes an existing SMB share
*   **Set-SmbShare**: Modifies properties of an existing share

Understanding which commands are available helps you choose the right tool for your task. You can use similar commands to explore other modules’ capabilities.

## Importing Modules Automatically

To see how PowerShell handles modules dynamically, here’s an example showing the dynamic module loading:

```
PS> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   7.0.0.0    Microsoft.PowerShell.Management    {Add-Computer, Add-Content...}
Manifest   7.0.0.0    Microsoft.PowerShell.Utility       {Add-Member, Add-Type...}
Script     2.0.0      PSReadline                         {Get-PSReadLineKeyHandler...}

PS> Get-SmbShare

PS> Get-Module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   7.0.0.0    Microsoft.PowerShell.Management    {Add-Computer, Add-Content...}
Manifest   7.0.0.0    Microsoft.PowerShell.Utility       {Add-Member, Add-Type...}
Script     2.0.0      PSReadline                         {Get-PSReadLineKeyHandler...}
Binary     1.0.0.1    SmbShare                          {Get-SmbShare, Set-SmbShare...}
```

As shown above, when you run Get-SmbShare, PowerShell automatically imports the SmbShare module. You can see this module appears in the list after running the command.

## Removing and Re-importing Modules

You may need to clear a module from memory, such as when testing new configurations or resolving conflicts. If so, no worries; PowerShell lets you remove a module without uninstalling it, enabling you to reset or refresh the session as needed.

To remove a module from memory:

```powershell
Remove-Module -Name SmbShare
```

The `Remove-Module` cmdlet clears the module from memory but doesn’t uninstall it from your system. While removing modules is rare in everyday use, it’s useful for specific scenarios.

To manually import the module back:

```powershell
Import-Module -Name SmbShare
```

Manual importing can be helpful when troubleshooting or working in custom environments.

## Re-importing Modules After Changes

When working on a module under development, you may encounter situations where changes you make don’t immediately take effect. Old data or configurations may still be loaded in the module, causing this behavior.

Re-importing the module ensures that PowerShell uses the latest version. If you modify a module you’re developing, you must re-import it.

You could use both `Remove-Module` and `Import-Module` or simplify the process with the `Force` parameter:

```powershell
Import-Module -Name SmbShare -Force
```

The `Force` parameter unloads and reloads the module in one step, making it ideal for development and testing workflows.

## Conclusion

In this guide, you’ve learned how to manage PowerShell modules—checking imports and importing, removing, and re-importing modules. You also explored how PowerShell dynamically imports modules and how to control loading to troubleshoot or test custom configurations manually.

Now, apply these skills by experimenting with custom modules in your scripts. Explore module development and use the `Force` parameter to ensure changes take effect.

Improve your troubleshooting, script development, and overall PowerShell workflow with PowerShell modules!

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fpowershell-modules-guide-2%2F&text=PowerShell%20101%3A%20Importing%20Modules)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fpowershell-modules-guide-2%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fpowershell-modules-guide-2%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/06/26995-troubleshoot-dns-issues-powershell-codex.webp)

### [Troubleshoot DNS Issues with PowerShell](/troubleshoot-dns-issues-powershell/)

Troubleshoot DNS issues with PowerShell by testing name resolution, DNS client settings, cache entries, and network connectivity in a repeatable workflow.

![](https://adamtheautomator.com/wp-content/uploads/2025/10/image_2025-10-24_095322075.png)

### [Migrating from PowerShell 6 to 7.5: Breaking Changes/New Features](/migrating-powershell-6-to-7-5/)

Migrate from PowerShell Core 6 to 7.5: breaking changes, features, and testing tips.

![](https://adamtheautomator.com/wp-content/uploads/2025/06/featured-image-6.png)

### [How to Add Timeouts to Pester Tests with PowerShell Runspaces](/pester-test-timeout-runspaces/)

Prevent Pester tests from hanging indefinitely using PowerShell runspaces. Learn to handle variable scoping, module loading, TestDrive access, and stream capture challenges with timeout protection.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
