PowerShell script exchange
Post Reply
Posts: 1
Liked: never
Joined: Dec 25, 2014 12:59 am
Full Name: Francis Swipes

Repository size using powershell

Post by fswipes » Dec 25, 2014 1:11 am

After looking at the SAMReport for Veeam I decided to try it on our system - seems to be everything any red-blooded Veeam user could ask for. When I run the report, I get an error attempting to load [Veeam.Backup.Core.CRemoteWinFileCommander] - it doesn't seem to be available. I can load [Veeam.Backup.Core.CRemoteWinFile] but that doesn't have a Create method and the rest of the report (at least as far as the repository information) is blank. What am I missing? I am running Veeam

Thanks for any assistance.

Product Manager
Posts: 17439
Liked: 1553 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Repository size using powershell

Post by veremin » Dec 25, 2014 12:02 pm

The said script was interacting more or less directly with the internal database structure which changes from version to version. So, typically there are no guarantees that such scripts will work on all product versions. The mentioned method must have been removed in version 8, thus, the script doesn't work any longer. Thanks.

Posts: 94
Liked: 6 times
Joined: Apr 21, 2011 7:37 pm

Re: Repository size using powershell

Post by pizzim13 » Jan 13, 2015 8:50 pm

I just switched to using WMI. Ideally this should be a CIM call since WMI will be deprecated.

Code: Select all

foreach ($Repo in (Get-VBRBackupRepository)) 
        $RepoServer = $Repo.GetHost()
        $RepoDrive = "'"+$repo.Path.Split("\")[0]+"'"
        $storage = Get-WmiObject Win32_LogicalDisk -ComputerName $Repo.GetHost().RealName -Filter "DeviceID=$RepoDrive"

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests