Currently I'm creating a script to list all Replica Restore Points. By this command :
$Session = Get-VBRRestorePoint | where{$_.Name -eq <VmName>} | Where{$_.Type -eq "Snapshot"} | Sort CreationTime -Descending | Select -First 12
I've succeeded in gathering some information like ( by "$Session.AuxData.ReplSummary" ) :
JobName | CreationDate | OrigVmName | OrigVmRef | OrigEsxName | OrigDisplayPath
To get the Snapshot Size ( the Restore Point ), I've used $Session.ApproxSize .
What I would like, it is to get the VM_replica Size on the Datastore ( It's real size must be the Used Storage ). With the command Get-VBRServer -Name $ESX | Find-VBRviDatastore, we can retrieve the Capacity and the FreeSpace.
Is there a Powershell Command to get all VM's Replica size on Datastore ? Or Do I Have to Install a PowerCLI ?
Many Thanks
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Apr 18, 2018 8:42 am
- Full Name: Alexandre Dinh-Debouny
- Contact:
-
- Product Manager
- Posts: 5635
- Liked: 1181 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: VM_Replica Size on the Datastore - Need a VEEAM Script
You can install PowerCLI and combine them together.
Via PowerCLI just loop through the list of replicas and do:
Via PowerCLI just loop through the list of replicas and do:
Code: Select all
$vm = Get-VM -Name <REPLICA>
$vm.ProvisionedSpaceGB - $vm.UsedSpaceGB
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Apr 18, 2018 8:42 am
- Full Name: Alexandre Dinh-Debouny
- Contact:
Re: VM_Replica Size on the Datastore - Need a VEEAM Script
vmniels wrote:You can install PowerCLI and combine them together.
Via PowerCLI just loop through the list of replicas and do:Code: Select all
$vm = Get-VM -Name <REPLICA> $vm.ProvisionedSpaceGB - $vm.UsedSpaceGB
Thanks for your solution but I was planning to create a Schedule Task in Windows and to use the Get-VM command, I have to connect to the Vcenter :
Connect-VIServer -Server <Vcenter FQDN> -User <AD User> -Password <AD Password>
And the company's rules force us [b]to change our AD Password every Month[/b] .
-
- Product Manager
- Posts: 5635
- Liked: 1181 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: VM_Replica Size on the Datastore - Need a VEEAM Script
How about you use a dedicated account using the built-in SSO (vsphere.local by default)? Which you can restrict down to only run that specific command?
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
Who is online
Users browsing this forum: vizzzor and 10 guests