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 srvveeam02.internal.com.na


So the whole thing will look like this:

Code: Select all
$s = New-PSSession -Computername srvveeam02.internal.com.na
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.
1-0-1
Enthusiast
 
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

ThomasMc
Expert
 
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

[merged]

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
George
Influencer
 
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.
svenschulze
Lurker
 
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.
foggy
Veeam Software
 
Posts: 14728
Liked: 1078 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Previous

Return to PowerShell



Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 5 guests