User Creation Template - Custom Script error

User Creation Template - Custom Script error

 I've created a very basic custom script (location D:\ManageEngine\ADManager Plus\bin)

I've got following command in the script .ps1 script

Enable-RemoteMailbox -id %userName% -Archive

In the Script command I've specified

powershell .\contractorcreation.ps1 -Arg1 %username%

When i create the user it gives me a message 

Custom script result:

Enable-RemoteMailbox : The term 'Enable-RemoteMailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At D:\ManageEngine\ADManager Plus\bin\contractorcreation.ps1:1 char:1 + Enable-RemoteMailbox -id %userName% -Archive + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Enable-RemoteMailbox:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException



                    New to ADSelfService Plus?