Mark as Free CLI

PowerShell script exchange

Mark as Free CLI

Veeam Logoby ninjam » Mon Dec 30, 2013 10:13 pm

Hi,
how can I simulate the "Mark as free" GUI menu' command using only powershell command ?

I didn't find the similar command from veeam powershell guide.

Anyone can help me ?

Best Regards
ninjam
Lurker
 
Posts: 2
Liked: never
Joined: Mon Dec 30, 2013 10:10 pm

Re: Mark as Free CLI

Veeam Logoby v.Eremin » Tue Jan 07, 2014 4:36 am

You should move a given medium to "Free" Media Pool, using Move-VBRTapeMedium command.

Code: Select all
Move-VBRTapeMedium -Medium $tape -MediaPool $pool // Where $pool is a "Free" media pool.


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

Re: Mark as Free CLI

Veeam Logoby v.Eremin » Fri Jan 10, 2014 1:17 pm

Additionally, you can use the following script:

Code: Select all
$Medium = Get-VBRTapeMedium -Name "Name of tape"
$Medium.MarkAsFree()

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

[Merged] : Mark tape as free

Veeam Logoby bplancic » Tue Jan 28, 2014 3:17 pm

Hi is tghere any way to mark tape as free via powershell?
I only found the command to erase tape but i just want it marked as free.

Ty in advance.

regards
bplancic
Influencer
 
Posts: 16
Liked: never
Joined: Tue Nov 26, 2013 11:37 am

Re: Mark as Free CLI

Veeam Logoby v.Eremin » Tue Jan 28, 2014 3:27 pm

Yep, it should be possible, using one of the methods described above.

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

Re: Mark as Free CLI

Veeam Logoby bplancic » Tue Jan 28, 2014 8:25 pm

Ty, that does the trick
bplancic
Influencer
 
Posts: 16
Liked: never
Joined: Tue Nov 26, 2013 11:37 am

Re: Mark as Free CLI

Veeam Logoby v.Eremin » Wed Jan 29, 2014 8:30 am

Glad to hear that my input was helpful. Also, feel free to use the corresponding section of our online Help Center that provides detailed information about existing PS commandlets.

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

[MERGED] missing $medium.markasfree() method in version 8

Veeam Logoby bar971 » Fri Mar 06, 2015 3:07 pm

Why in version 8 is not more possible do this :?: :?: :?: :?: :?: :

Code: Select all
$Medium = Get-VBRTapeMedium -Name "Name of tape"
$Medium.MarkAsFree()


the markasfree() method is missing in medium type object!! :evil: :evil: :evil: :evil:

How can I set 'as free' a tape using powershell with VB&R 8 ??? :?: :?: :?: :?:

Thank you all.
bar971
Influencer
 
Posts: 12
Liked: never
Joined: Tue Nov 06, 2012 10:43 am
Full Name: Christian

Re: Mark as Free CLI

Veeam Logoby Vitaliy S. » Fri Mar 06, 2015 4:49 pm

Hi Christian, please try to follow the instructions given by Vladimir in the first post.
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Mark as Free CLI

Veeam Logoby bar971 » Mon Mar 09, 2015 8:38 am

Vitaliy S. wrote:Hi Christian, please try to follow the instructions given by Vladimir in the first post.


I have already done this 'workaround'! But it's a workaround and not a dot net method that does the "mark-as-free" action as the one in the GUI.

My question is: why veeam has changed this behaviour without any notice, breaking all scripts ??
I think this is not a way to go!

thanks for your time
bar971
Influencer
 
Posts: 12
Liked: never
Joined: Tue Nov 06, 2012 10:43 am
Full Name: Christian

Re: Mark as Free CLI

Veeam Logoby v.Eremin » Tue Mar 10, 2015 2:15 pm

In fact, it's not a workaround, because marking tape as free places it inside "Free" media pool. The script provided above does the same.

As to missing methods, some explanation is provided in the adjacent thread.

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


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests