### Import modules from the PowerShell Gallery
You can import [PowerShell Gallery](https://www.powershellgallery.com) modules either directly from the Gallery or from your Automation account.
To import a module directly from the PowerShell Gallery:
1. Go to [https://www.powershellgallery.com](https://www.powershellgallery.com) and search for the module to import.
2. Under **Installation Options**, on the **Azure Automation** tab, select **Deploy to Azure Automation**. This action opens the Azure portal.
3. On the Import page, select your Automation account, and select **OK**.

To import a PowerShell Gallery module directly from your Automation account:
1. In the portal, search for and select **Automation Accounts**.
1. On the **Automation Accounts** page, select your Automation account from the list.
1. Under **Shared Resources**, select **Modules**.
1. Select **Browse gallery**, and then search the Gallery for a module.
1. Select the module to import, and select **Import**.
1. Select **OK** to start the import process.

## Delete modules
If you have problems with a module, or you need to roll back to a previous version of a module, you can delete it from your Automation account. You can't delete the original versions of the [default modules](#default-modules) that are imported when you create an Automation account. If the module to delete is a newer version of one of the [default modules](#default-modules), it rolls back to the version that was installed with your Automation account. Otherwise, any module you delete from your Automation account is removed.
### Delete modules in the Azure portal
To remove a module in the Azure portal:
1. In the portal, search for and select **Automation Accounts**.
1. On the **Automation Accounts** page, select your Automation account from the list.
1. Under **Shared Resources**, select **Modules**.
1. Select the module you want to remove.
1. On the Module page, select **Delete**. If this module is one of the [default modules](#default-modules), it rolls back to the version that existed when the Automation account was created.
### Delete modules by using PowerShell
To remove a module through PowerShell, run the following command: