PowerShell script exchange
Post Reply
livdvee
Novice
Posts: 6
Liked: never
Joined: May 14, 2019 9:44 am
Full Name: David
Contact:

How to use Exchange cmdlets

Post by livdvee »

Hi,

I've loaded the Veeam powershell editor via the B&R console gui and imported the exchange module. But I still cannot run commands like Get-VEXCommand as they are not recognised.

I can run get-vbr command but cant get the exchange specific commands.

Im trying to write a script to automate multiple mailbox restores.

Thanks.
Vitaliy S.
VP, Product Management
Posts: 27110
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How to use Exchange cmdlets

Post by Vitaliy S. » 1 person likes this post

Hi,

Did you import all the modules before trying to execute the VEX cmdlet?

Thanks!
livdvee
Novice
Posts: 6
Liked: never
Joined: May 14, 2019 9:44 am
Full Name: David
Contact:

Re: How to use Exchange cmdlets

Post by livdvee »

I imported Veeam.Exchange.PowerShell

But not

Import-Module Veeam.Sharepoint.PowerShell

Import-Module Veeam.Oracle.PowerShell

Import-Module Veeam.SQL.PowerShell

as I want to use the exchange specific cmdlets

however, I noticed if I try to import the last three, they are not available for import.
Vitaliy S.
VP, Product Management
Posts: 27110
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How to use Exchange cmdlets

Post by Vitaliy S. »

Ah, I didn't notice it in your original post, sorry for that. You've tried doing this via Veeam B&R console, do you see the same result for Veeam.Exchange.PowerShell when just starting the PS snap-in in Windows and registering all manually?
livdvee
Novice
Posts: 6
Liked: never
Joined: May 14, 2019 9:44 am
Full Name: David
Contact:

Re: How to use Exchange cmdlets

Post by livdvee »

Hi, thanks for your reply and for taking the time to assist me.

Yes I get the same result im afraid.
ri_joe
Influencer
Posts: 10
Liked: never
Joined: May 02, 2019 8:28 am
Contact:

Re: How to use Exchange cmdlets

Post by ri_joe »

Try to include this command

Add-PSSnapin VeeamPSSnapin
livdvee
Novice
Posts: 6
Liked: never
Joined: May 14, 2019 9:44 am
Full Name: David
Contact:

Re: How to use Exchange cmdlets

Post by livdvee »

Hi thanks for your reply.

Yes i'm following the notes here: https://helpcenter.veeam.com/docs/backu ... l?ver=95u4

So I've already completed this step.
Vitaliy S.
VP, Product Management
Posts: 27110
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How to use Exchange cmdlets

Post by Vitaliy S. »

Are you performing these steps on the backup server or in a remote computer with just a backup console installed?
livdvee
Novice
Posts: 6
Liked: never
Joined: May 14, 2019 9:44 am
Full Name: David
Contact:

Re: How to use Exchange cmdlets

Post by livdvee »

Im on the server with Veeam B&R on and have run run Powershell from within the software, and just tried running it from a normal powershell session.
Vitaliy S.
VP, Product Management
Posts: 27110
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How to use Exchange cmdlets

Post by Vitaliy S. »

Ok, do you see the VEX module by running this command Get-Module? This would should you if this module is registered or not. If not, this would explain why cmdlet is not recognized and I would suggest contacting our support team for quick WebEx session to sort it out.
livdvee
Novice
Posts: 6
Liked: never
Joined: May 14, 2019 9:44 am
Full Name: David
Contact:

Re: How to use Exchange cmdlets

Post by livdvee »

Yes as per my first post I still cannot run commands like Get-VEXCommand as they are not recognised.

Thanks ill open a ticket
Vitaliy S.
VP, Product Management
Posts: 27110
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: How to use Exchange cmdlets

Post by Vitaliy S. »

Let us know your case ID, so that we could update this topic with a solution for future readers. Thanks!
cw_
Lurker
Posts: 1
Liked: never
Joined: Feb 20, 2019 12:39 am
Contact:

Re: How to use Exchange cmdlets

Post by cw_ »

Hi - How was this issue resolved?

I'm experiencing the same exact issue where we're able to add the VeeamPSSnapIn using "Add-PSSnapIn" command, but we cannot add any of the following modules using the Import-Module command:

Import-Module Veeam.Exchange.PowerShell
Import-Module Veeam.Sharepoint.PowerShell
Import-Module Veeam.Oracle.PowerShell
Import-Module Veeam.SQL.PowerShell

The error message displayed is:

Import-Module : The specified module 'Veeam.Exchange.PowerShell' was not loaded because no valid module file was found in any module directory.

We have following the exact steps as the OP did also. Our PSVersion is v5.1

Any assistance is appreciated. Thanks!
nielsengelen
Product Manager
Posts: 5634
Liked: 1181 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: How to use Exchange cmdlets

Post by nielsengelen »

As suggested in this topic, please contact support for insight and a solution.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 17 guests