-
- Novice
- Posts: 8
- Liked: 3 times
- Joined: Nov 21, 2013 12:52 pm
- Full Name: Dragan Bodrozic
- Contact:
How to list all objects
I want to list (Guest processing - Advanced - Guest processing settings) All objects (VMs) with his Account(s) in every jobs? How to do that? Something like this:
===========
Job1
===========
Object: VM1 Acount: Domain\User1
Object: VM2 Acount: Domain\User2
-------------------------------------------
===========
Job2
===========
Object: VM3 Acount: Domain\User1
Object: VM4 Acount: Domain\User1
Object: VM5 Acount: Domain\User2
-------------------------------------------
...
===========
Job1
===========
Object: VM1 Acount: Domain\User1
Object: VM2 Acount: Domain\User2
-------------------------------------------
===========
Job2
===========
Object: VM3 Acount: Domain\User1
Object: VM4 Acount: Domain\User1
Object: VM5 Acount: Domain\User2
-------------------------------------------
...
-
- Product Manager
- Posts: 20413
- Liked: 2301 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to list all objects
Try this example and see whether it meets your expectations. I know it can be formatted better, but I don't have time to do it at the moment:
Thanks.
Code: Select all
Foreach ($Job in (Get-VBRJob | where {$_.VSSOptions.Enabled -eq $True}))
{
"================================================================================"
$Job.Name
"================================================================================"
Foreach ($Object in ($Job.GetViOijs() | where {$_.VSSOptions.Enabled -eq $True}))
{
$Object | Select @{N="Object";E={$_.Name}}, @{N="Account";E={[Veeam.Backup.Core.CLinuxCredentials]::Find($_.VssOptions.WinCredsId).Credentials.Name}} | ft -AutoSize
}
"--------------------------------------------------------------------------------"
}
-
- Novice
- Posts: 8
- Liked: 3 times
- Joined: Nov 21, 2013 12:52 pm
- Full Name: Dragan Bodrozic
- Contact:
Re: How to list all objects
No. Under Account there is nothing. I forgot to say version is V7 full patched.
Here are the screen results of execution of script:
===============================================================================
Job1
===============================================================================
Object Account
------ -------
VM1
Object Account
------ -------
VM2
Object Account
------ -------
VM3
Object Account
------ -------
-------------------------------------------------------------------------------
===============================================================================
Job2
===============================================================================
Object Account
------ -------
VM4
Object Account
------ -------
VM5
Object Account
------ -------
-------------------------------------------------------------------------------
...
Here are the screen results of execution of script:
===============================================================================
Job1
===============================================================================
Object Account
------ -------
VM1
Object Account
------ -------
VM2
Object Account
------ -------
VM3
Object Account
------ -------
-------------------------------------------------------------------------------
===============================================================================
Job2
===============================================================================
Object Account
------ -------
VM4
Object Account
------ -------
VM5
Object Account
------ -------
-------------------------------------------------------------------------------
...
-
- Product Manager
- Posts: 20413
- Liked: 2301 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to list all objects
So, you were not talking about customizable guest OS "Credentials" for individual VMs and OSes, but rather about creds used for OS indexing?
By the way, is there any specific reason not to update to the latest product version, making use of new functionality along with improvements and enhancements?
Thanks.
By the way, is there any specific reason not to update to the latest product version, making use of new functionality along with improvements and enhancements?
Thanks.
-
- Novice
- Posts: 8
- Liked: 3 times
- Joined: Nov 21, 2013 12:52 pm
- Full Name: Dragan Bodrozic
- Contact:
Re: How to list all objects
but rather about creds used for OS indexing?
Yes
No. Everything works ok and daily responsibilities does not allow me migrate to V8. Too much work for one man
-
- Product Manager
- Posts: 20413
- Liked: 2301 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to list all objects
I think this script should do the trick for version 7:
Make sure to update to the version 8 Update 2, whenever you have time for it, as it's always recommended to stay updated.
Thanks.
Code: Select all
Foreach ($Job in (Get-VBRJob | where {$_.VSSOptions.IsIndexingRequired() -eq $True}))
{
"================================================================================"
$Job.Name
"================================================================================"
Foreach ($Object in ($Job.GetViOijs() | where {$_.VSSOptions.Enabled -eq $True}))
{
$Object | Select @{N="Object";E={$_.Name}}, @{N="Account";E={$_.VssOptions.Credentials.Name}} | ft -AutoSize
}
"--------------------------------------------------------------------------------"
}
Thanks.
-
- Novice
- Posts: 8
- Liked: 3 times
- Joined: Nov 21, 2013 12:52 pm
- Full Name: Dragan Bodrozic
- Contact:
Re: How to list all objects
Good job. It works!
-
- Product Manager
- Posts: 20413
- Liked: 2301 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: How to list all objects
You're welcome. Should other help with scripting be needed, I'd be glad to help. Thanks.
Who is online
Users browsing this forum: No registered users and 11 guests