Repository size using powershell

PowerShell script exchange

Repository size using powershell

Veeam Logoby fswipes » Thu 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.
Posts: 1
Liked: never
Joined: Thu Dec 25, 2014 12:59 am
Full Name: Francis Swipes

Re: Repository size using powershell

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

Re: Repository size using powershell

Veeam Logoby pizzim13 » Tue 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"
Posts: 86
Liked: 6 times
Joined: Thu Apr 21, 2011 7:37 pm

Return to PowerShell

Who is online

Users browsing this forum: No registered users and 5 guests