PowerShell script exchange
Post Reply
pizzim13
Enthusiast
Posts: 94
Liked: 6 times
Joined: Apr 21, 2011 7:37 pm
Contact:

Connect to remote Veeam Backup server with powershell

Post by pizzim13 »

Is there a powershell cmdlet to remotely connect to a Veeam server?
Gostev
Chief Product Officer
Posts: 31793
Liked: 7295 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by Gostev »

AFAIK PowerShell 2.0 supports remote operations (this has nothing to do with Veeam though).
a.fokkema
Influencer
Posts: 13
Liked: never
Joined: Mar 30, 2011 2:06 pm
Full Name: Arne Fokkema
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by a.fokkema »

@Gostev, Is it possible to add the cmdlet to the upcoming release of Veeam B&R?
Gostev
Chief Product Officer
Posts: 31793
Liked: 7295 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by Gostev »

What cmdlet?
gvinpin
Enthusiast
Posts: 38
Liked: never
Joined: Jan 01, 2006 1:01 am
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by gvinpin »

I would suggest that Veeam need to have a manual for PowerShell and PS remote connection.
It is a gray area, and many of enterprise customers have to raise a support calls for a simple script.
I will talk to my sales rep about it.
Alexey D.

Re: Connect to remote Veeam Backup server with powershell

Post by Alexey D. »

Hello,

There is a section devoted to PowerShell usage, in the User Guide and a help file shipped with B&R console (available through Help -> Help menu item). It also includes information on Veeam PowerShell remoting. Does it help you?
a.fokkema
Influencer
Posts: 13
Liked: never
Joined: Mar 30, 2011 2:06 pm
Full Name: Arne Fokkema
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by a.fokkema »

Gostev wrote:What cmdlet?
Like the VMware PowerCLI cmdlet connect-viserver to connect with the vCenter Server or a vSphere host. It would be awsome to work with Powershell without the use of Remoting.
Gostev
Chief Product Officer
Posts: 31793
Liked: 7295 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by Gostev »

Hmm... but what's wrong with remoting? Available today, and does the job.
a.fokkema
Influencer
Posts: 13
Liked: never
Joined: Mar 30, 2011 2:06 pm
Full Name: Arne Fokkema
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by a.fokkema »

It does the job indeed but with some limitations.
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by Sethbartlett »

What limitations? There is a memory limitation for each remote powershell that is created, which is set to 120MB I believe by default, but this can be increased to whatever number you need. After remoting in, I don't see what other limitations will hold you back from using our powershell cmdlets.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Gostev
Chief Product Officer
Posts: 31793
Liked: 7295 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by Gostev »

LOL. I actually expected to see the wrath from our PowerShell guru when he sees that... and here it comes :mrgreen:
tankbusta
Lurker
Posts: 1
Liked: never
Joined: Jan 22, 2011 4:57 pm
Full Name: Christopher Schmitt
Contact:

Load Veeam Module Remotely

Post by tankbusta »

[merged]

Is anyone using WindowsRM to query Powershell/Veeam remotely? I am trying to figure out the best way to get the Veeam Module imported.

I've tried creating a profile for everyone that has the module imported and that works on the server itself but it doesn't seem to work on a remote runspace. I also tried executing Import-Module "C:\...\Veeam.Backup.Powershell.dll" but that does not work either...
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: Load Veeam Module Remotely

Post by ThomasMc »

tankbusta wrote:Is anyone using WindowsRM to query Powershell/Veeam remotely? I am trying to figure out the best way to get the Veeam Module imported.

I've tried creating a profile for everyone that has the module imported and that works on the server itself but it doesn't seem to work on a remote runspace. I also tried executing Import-Module "C:\...\Veeam.Backup.Powershell.dll" but that does not work either...
Once your connected to your veeam server just do

Code: Select all

asnp "VeeamPSSnapIn"
jteager
Influencer
Posts: 10
Liked: never
Joined: Mar 28, 2011 2:13 pm
Full Name: Justin Teager
Contact:

Re: Connect to remote Veeam Backup server with powershell

Post by jteager »

Best way to do it in my experience is to use

Code: Select all

Invoke-Command -ComputerName "VBR-01" -ScriptBlock "asnp VeeamPSSnapin; #some code, using semicolons instead of line breaks#" 
Nice thing with that as well is that if you're converting the data to a native powershell format (as opposed to the Veeam objects) you can do all the actual manipulation on the local side by returning the hash/array/string/what-have-you.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests