# Import-Module error! Powershell Script 📃

**URL:** <https://community.automationedge.com/t/import-module-error-powershell-script/2265>\
**Category:** Self-Help & Learn\
**Tags:** rpa, article\
**Created:** [June 25, 2020, 12:55pm UTC](https://community.automationedge.com/t/import-module-error-powershell-script/2265 "2020-06-25T12:55:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aesupport](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.automationedge.com/aesupport/32/371_2.png) [@aesupport](https://community.automationedge.com/u/aesupport)\
**Post date:** [June 25, 2020, 12:55pm UTC](https://community.automationedge.com/t/import-module-error-powershell-script/2265/1 "2020-06-25T12:55:45Z")

</div>

**Problem** :

> **“Dealing with Powershell Script in Process Studio? Throws _Import-Module error!!_"**

`Import-Module : The specified module 'MSOnline' was not loaded because no valid module file was found in any module directory.At D:\tools\Agents\E3License.ps1:208 char:5+ Import-Module MSOnline+ ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (MSOnline:String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand`  
  
  
**Solution** :

_ **Try below options:** _

1. Keep AE agent on a short path. Say D:\Agents and remove the spaces present in the Agent Path.

2. Please refer these links and check whether it’s working?

_ **If The script is working fine earlier on AE 5.1.0 wit process studio and agents, but after upgrading AE to 5.4.1 it showing this error with agent from same machine.** _

`Try the below changes in DEV environment:`

- Check the powershell MSOnline module verison on both the machine/server using powershell commands:

- The powershell MSOnline verison on both the machine should match. If the verision is different, then please re-install the same version of MSOnline module(_where script is working_) on the another machine(_where script is not working_).

- After re-installing the powershell module, please check the version again using powershell command prompt. Sometimes the installation gets done but the powershell Modules/Version didn’t get change.

- If the version didn’t get change after re-installation as well, then contact to your IT team and take a help from them to install the correct powershell version.

- Install the correct verison of MSOnline module on the agent machine and your issue will get _resolved_ automatically.

- If this issue gets resolved by updating the MSOnline modules then you can conclude that this issue is not related to an agent or AE version upgrade and it is something related to the Powershell-version/OS or any system-level changes on a current dealing server.

Enjoy the automation with ☞ **AutomationEdge!!**
