PowerShell script exchange
Post Reply
ninjam
Lurker
Posts: 2
Liked: never
Joined: Dec 30, 2013 10:10 pm

Mark as Free CLI

Post by ninjam » 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

veremin
Product Manager
Posts: 16901
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin » 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.

veremin
Product Manager
Posts: 16901
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin » 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.

bplancic
Influencer
Posts: 20
Liked: never
Joined: Nov 26, 2013 11:37 am
Contact:

[Merged] : Mark tape as free

Post by bplancic » 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

veremin
Product Manager
Posts: 16901
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin » Jan 28, 2014 3:27 pm

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

Thanks.

bplancic
Influencer
Posts: 20
Liked: never
Joined: Nov 26, 2013 11:37 am
Contact:

Re: Mark as Free CLI

Post by bplancic » Jan 28, 2014 8:25 pm

Ty, that does the trick

veremin
Product Manager
Posts: 16901
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin » 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.

bar971
Influencer
Posts: 12
Liked: never
Joined: Nov 06, 2012 10:43 am
Full Name: Christian
Contact:

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

Post by bar971 » 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.

Vitaliy S.
Product Manager
Posts: 23001
Liked: 1557 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Mark as Free CLI

Post by Vitaliy S. » Mar 06, 2015 4:49 pm

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

bar971
Influencer
Posts: 12
Liked: never
Joined: Nov 06, 2012 10:43 am
Full Name: Christian
Contact:

Re: Mark as Free CLI

Post by bar971 » 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

veremin
Product Manager
Posts: 16901
Liked: 1438 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin » 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest