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 »

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: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin »

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: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin »

Additionally, you can use the following script:

Code: Select all

$Medium = Get-VBRTapeMedium -Name "Name of tape"
$Medium.MarkAsFree()
Thanks.
bplancic
Influencer
Posts: 21
Liked: never
Joined: Nov 26, 2013 11:37 am
Contact:

[Merged] : Mark tape as free

Post by bplancic »

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: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin »

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

Thanks.
bplancic
Influencer
Posts: 21
Liked: never
Joined: Nov 26, 2013 11:37 am
Contact:

Re: Mark as Free CLI

Post by bplancic »

Ty, that does the trick
veremin
Product Manager
Posts: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin »

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 »

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.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Mark as Free CLI

Post by Vitaliy S. »

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 »

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: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Mark as Free CLI

Post by veremin »

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 10 guests