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

PowerShell script exchange

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

Veeam Logoby raymonderiley » Tue Oct 13, 2015 4:14 am

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!
raymonderiley
Novice
 
Posts: 3
Liked: 1 time
Joined: Sat Oct 03, 2015 2:26 pm
Full Name: Raymond Riley

Re: Looking for a powershell script for finding VSS enabled

Veeam Logoby v.Eremin » Tue Oct 13, 2015 8:52 am

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?
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Looking for a powershell script for finding VSS enabled

Veeam Logoby raymonderiley » Tue Oct 13, 2015 2:12 pm

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!
raymonderiley
Novice
 
Posts: 3
Liked: 1 time
Joined: Sat Oct 03, 2015 2:26 pm
Full Name: Raymond Riley

Re: Looking for a powershell script for finding VSS enabled

Veeam Logoby v.Eremin » Tue Oct 13, 2015 2:55 pm

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.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Looking for a powershell script for finding VSS enabled

Veeam Logoby raymonderiley » Mon Oct 19, 2015 12:55 pm 1 person likes this post

This worked great. Thank you very much!
raymonderiley
Novice
 
Posts: 3
Liked: 1 time
Joined: Sat Oct 03, 2015 2:26 pm
Full Name: Raymond Riley

Re: Looking for a powershell script for finding VSS enabled

Veeam Logoby v.Eremin » Mon Oct 19, 2015 1:25 pm

You're welcome. Should other questions arise, don't hesitate to let us know. 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 3 guests