Could we stop restoring VM by PS?

PowerShell script exchange

Could we stop restoring VM by PS?

Veeam Logoby Cathy » Tue Oct 28, 2014 8:39 am

We want to stop restoring VMs. Now we try to use "Remove-VBRRestoreSession" to do it.
However, we try:
1. Get-VBRRestoreSession -Name "zhouzhengguang"|select -last 1|Remove-VBRRestoreSession
2. $session=Get-VBRRestoreSession -Name "zhouzhengguang"|select -last 1
Remove-VBRRestoreSession -Session $session
both get "This cmdlet is obsolete" .

We use Veeam B&R v7 with patch 4. From document, we know Remove-VBRRestoreSession should work with this version. Or we should use other cmdlet? (Or, could we stop restoring VM by powershell?)
Cathy
Influencer
 
Posts: 16
Liked: never
Joined: Fri Jun 13, 2014 3:48 am
Full Name: Cathy Hu

Re: Could we stop restoring VM by PS?

Veeam Logoby v.Eremin » Thu Oct 30, 2014 8:12 pm

You should use Stop-VBRWindowsfilerestore commandlet. In order to stop restore session, you should execute restore from PS first and assign the resulting session to a variable.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Could we stop restoring VM by PS?

Veeam Logoby TrueAlex » Tue Jan 19, 2016 2:37 pm

Is there any way to close restore session which is started from GUI?
TrueAlex
Novice
 
Posts: 3
Liked: never
Joined: Mon Nov 09, 2015 2:06 pm

Re: Could we stop restoring VM by PS?

Veeam Logoby v.Eremin » Tue Jan 19, 2016 3:25 pm

I'm afraid, no. The Windows FLR session should be executed first via PS and assigned to a variable. Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Could we stop restoring VM by PS?

Veeam Logoby jed-hyper » Tue Jul 25, 2017 10:04 pm

Hi, I'd also like to be able to run Stop-VBRWindowsFileRestore on a restore that was started from the GUI
If an admin starts a restore from the GUI and forgets to close it it is stopping parts of my powershell scripts from running.
Is there already a feature request for this.
jed-hyper
Enthusiast
 
Posts: 33
Liked: 4 times
Joined: Wed Feb 26, 2014 4:42 am
Full Name: Jed Parkes

Re: Could we stop restoring VM by PS?

Veeam Logoby v.Eremin » Wed Jul 26, 2017 11:45 am

There is a system variable called $FLRSessions. Using it, you can list of all currently running FLR sessions and, then, stop required ones with Stop-VBRWindowsFileRestore cmdlet. Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Could we stop restoring VM by PS?

Veeam Logoby jed-hyper » Fri Jul 28, 2017 12:34 am

Is there a link to information on how to use $FLRSessions
I have tried running this powershell command and it returns nothing
Code: Select all
Add-PSSnapin -Name VeeamPSSnapin
Connect-VBRServer -Server 'localhost'
$FLRSessions
jed-hyper
Enthusiast
 
Posts: 33
Liked: 4 times
Joined: Wed Feb 26, 2014 4:42 am
Full Name: Jed Parkes

Re: Could we stop restoring VM by PS?

Veeam Logoby v.Eremin » Fri Jul 28, 2017 2:24 pm

Sorry, I have provided a bit misleading information. $FLRSessions do not reflect sessions started from GUI, only sessions executed within PS console.

So, unfortunately, there doesn't seem to be a way to achieve what you are after.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Could we stop restoring VM by PS?

Veeam Logoby jed-hyper » Sun Jul 30, 2017 9:06 pm

Ah bugga, that's annoying, i was excited for a sec.
Is there already a feature request for this ?
jed-hyper
Enthusiast
 
Posts: 33
Liked: 4 times
Joined: Wed Feb 26, 2014 4:42 am
Full Name: Jed Parkes

Re: Could we stop restoring VM by PS?

Veeam Logoby v.Eremin » Mon Jul 31, 2017 12:43 pm

This request has been there for a while. Based on preliminary technical expertise, adding corresponding cmdlet didn't not seem like a trivial task, so we postponed the implementation.

Thank you for the feedback, though, much appreciated.
v.Eremin
Veeam Software
 
Posts: 13701
Liked: 1020 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

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