Remote PowerShell

PowerShell script exchange

Re: Remote PowerShell

Veeam Logoby 1-0-1 » Thu May 03, 2012 11:45 am

You are a champion!

Just for anybody want to use this - make sure to add your remote session declaration in front of the code block:

Code: Select all
$s = New-PSSession -Computername

So the whole thing will look like this:

Code: Select all
$s = New-PSSession -Computername
Invoke-Command -Session $s -ScriptBlock {
   Add-PsSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
   Get-VBRJob | where {$_.Name -eq "P1DR"} | Start-VBRJob -RunAsync

I also assume this is safe to run as a post job command as long as the VEEAM service account has accesss to the powershell script? I will be able to find out only tonight as I cannot kickstart this chain without causing issues with the schedule. In my case I have added "C:\SCRIPTS\RemoteStartP1DR.ps1" to the post activity/command section of a job.
Posts: 54
Liked: never
Joined: Tue Nov 30, 2010 1:38 pm
Full Name: Bernd

Re: Remote PowerShell

Veeam Logoby ThomasMc » Thu May 03, 2012 11:58 am 1 person likes this post

Posts: 293
Liked: 17 times
Joined: Wed Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell

Start Job Remotely

Veeam Logoby George » Wed Jun 27, 2012 4:31 pm


Hi Guys,

Whats the script to start a backup from a remote server?

I have a Veeam Server (Server A), i would like to start the backup using a script from a different server (Server B).

Thanks! :D
Posts: 22
Liked: never
Joined: Fri Jan 27, 2012 12:25 pm
Full Name: George

[MERGED] Starting a Backup Job per Script.

Veeam Logoby svenschulze » Mon Sep 02, 2013 6:55 am

Hi at all,

I want to start a Backup Job per Script from another Windows 2008 R2 with no veeam Sulution on it.
After the jobs's done, I need to receive the result of the backup job on the same way.
Posts: 1
Liked: never
Joined: Wed Aug 28, 2013 5:52 am

Re: Remote PowerShell

Veeam Logoby foggy » Mon Sep 02, 2013 7:17 am

Hello, please review this thread for the answers. If you need additional clarification, feel free to ask here. Thanks.
Veeam Software
Posts: 16301
Liked: 1302 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson


Return to PowerShell

Who is online

Users browsing this forum: No registered users and 6 guests