powershell documentation

PowerShell script exchange

powershell documentation

Veeam Logoby jftuga » Fri Jul 08, 2011 4:40 pm 1 person likes this post

Where might I find the powershell documentation for the "VeeamPSSnapin" snap-in for Backup & Replication 5.0.2 Enterprise. From the .chm help file, it suggests running "Get-VBRCommand" and "GetVBRToolkitDocumentation", but neither of these commands work for me: The term 'Get-VBRCommand' is not recognized as the name of a cmdlet, function, script file, or operable program.

After installing Veeam, I only see Start Menu -> Programs -> Veeam -> Veeam Backup and Replication. Since there is no icon for Veeam Powershell on the menu, I am unsure of the proper way to invoke a Veeam enabled shell. Therefore, I am starting a generic powershell on Server 2008 R2 and then typing in "Add-PSSnapin VeeamPSSnapin" as my first command. Get-VBRJob works as well as GetVBRJobOptions.

What I would really like is a PDF containing all of the commands, examples, etc. My end goal is to create about 30 new jobs with very specific settings. I believe this task will be much smoother, faster, and less error prone using powershell vs using the GUI.

Thanks,
-John
jftuga
Enthusiast
 
Posts: 26
Liked: 2 times
Joined: Fri Oct 22, 2010 7:02 pm
Location: Athens, GA
Full Name: John Taylor

Re: powershell documentation

Veeam Logoby Gostev » Fri Jul 08, 2011 6:14 pm

PDF you are looking for is the User Guide. Please refer to page 171 and onwards. This section provides both the information on how to obtain full documentation on all available PowerShell extensions, as well as some great examples. There are also many scripts posted on this forum by our users.

Note that PowerShell prompt with Veeam PowerShell snap-in already registered can be opened via Tools menu in the Veeam B&R console.

Thanks!
Gostev
Veeam Software
 
Posts: 21385
Liked: 2348 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: powershell documentation

Veeam Logoby jftuga » Fri Jul 08, 2011 6:49 pm

Thanks. This is exactly what I was looking for.

Is there anyway to launch the veeam enabled PS conole without having to start B&R first?

-John
jftuga
Enthusiast
 
Posts: 26
Liked: 2 times
Joined: Fri Oct 22, 2010 7:02 pm
Location: Athens, GA
Full Name: John Taylor

Re: powershell documentation

Veeam Logoby Gostev » Fri Jul 08, 2011 7:06 pm

Yes, and you have explained the way in your first post ;)
Gostev
Veeam Software
 
Posts: 21385
Liked: 2348 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: powershell documentation

Veeam Logoby harsh.shah » Fri Sep 16, 2011 11:47 am

Hi I am also facing the same problem. I have tried this and nothing works
harsh.shah
Veeam ProPartner
 
Posts: 6
Liked: never
Joined: Fri Feb 04, 2011 10:56 am
Full Name: Harsh Shah

Re: powershell documentation

Veeam Logoby foggy » Fri Sep 16, 2011 11:57 am

Harsh, what exactly does not work for you? Were you managed to open a PowerShell prompt via Tools menu in the Veeam B&R UI or by starting a generic Windows PowerShell and executing "Add-PSSnapin VeeamPSSnapin" command?
foggy
Veeam Software
 
Posts: 14716
Liked: 1075 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: powershell documentation

Veeam Logoby Sethbartlett » Sat Sep 17, 2011 3:29 am

To do "Get-VBRCommand" outside of Veeam, you will want to do:

Code: Select all
asnp VeeamPSSnapin
get-command -pssnapin "VeeamPSSnapIn"


The asnp is to add the snapin, the get-command is "Get-VBRCommand". For some reason, get-vbrcommand was a function built within the .ps1 file that is loaded into Veeam and not a cmdlet instead, so use that and you can get a list of the commands outside of the Veeam console.
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.
Sethbartlett
Expert
 
Posts: 282
Liked: 25 times
Joined: Wed Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett

Re: powershell documentation

Veeam Logoby harsh.shah » Fri Sep 30, 2011 1:31 pm

I have fixed the issue now by adding the following
Code: Select all
if((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null){
    Add-PSSnapin "VeeamPSSnapIn"
}

Thanks
harsh.shah
Veeam ProPartner
 
Posts: 6
Liked: never
Joined: Fri Feb 04, 2011 10:56 am
Full Name: Harsh Shah

Re: powershell documentation

Veeam Logoby jftuga » Mon Oct 03, 2011 12:08 pm

This is very helpful for me!

Thanks,
-John
jftuga
Enthusiast
 
Posts: 26
Liked: 2 times
Joined: Fri Oct 22, 2010 7:02 pm
Location: Athens, GA
Full Name: John Taylor


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests