PowerShell script exchange
Post Reply
raymonderiley
Novice
Posts: 4
Liked: 1 time
Joined: Oct 03, 2015 2:26 pm
Full Name: Raymond Riley
Contact:

Looking for a powershell script for finding VSS enabled VM's

Post by raymonderiley »

Case 01081704. I'm looking for a powershell script that perhaps someone has already created. If it could tell me the VEEAM job name and VM name if it is VSS enabled, that would be the best info I could get. I may want to tune it later, but this would be a good start. Does anyone have anything like this already created/tested/etc.? Thanks!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Looking for a powershell script for finding VSS enabled

Post by veremin »

If it could tell me the VEEAM job name and VM name if it is VSS enabled
Can you elaborate on the quoted portion a bit? You mean whether the job itself has Application Aware Image Processing enabled or source VMs have some individual application aware processing options set up?
raymonderiley
Novice
Posts: 4
Liked: 1 time
Joined: Oct 03, 2015 2:26 pm
Full Name: Raymond Riley
Contact:

Re: Looking for a powershell script for finding VSS enabled

Post by raymonderiley »

Source VM's is the list I need, and if the script would also tell me what job it is located in (we have hundreds of jobs), then that would be a great bonus. Thanks!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Looking for a powershell script for finding VSS enabled

Post by veremin »

Try something like this and see whether it meets your expectations:

Code: Select all

$VSSVMs = Get-VBRJob | where {$_.JobType -eq "Backup" -and $_.VSSOptions.Enabled -eq $True} | Get-VBRJobObject | where {$_.VSSOptions.Enabled -eq $True}
foreach ($VSSVM in $VSSVMs)
{
$VSSVM | Select @{N="VM Name"; E={$_.name}}, @{N="JobName"; E= {(Get-VBRJob | where {$_.Id -eq $VSSVM.JobId}).name}} 
}
Thanks.
raymonderiley
Novice
Posts: 4
Liked: 1 time
Joined: Oct 03, 2015 2:26 pm
Full Name: Raymond Riley
Contact:

Re: Looking for a powershell script for finding VSS enabled

Post by raymonderiley » 1 person likes this post

This worked great. Thank you very much!
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Looking for a powershell script for finding VSS enabled

Post by veremin »

You're welcome. Should other questions arise, don't hesitate to let us know. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests