PowerShell script exchange
Post Reply
matteu
Veeam Legend
Posts: 822
Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:

CDP Proxy cache unit

Post by matteu »

Hello,

I don't find where I can obtain unit for the cache size of the CDP proxy.

I can only find the number with (Get-VBRCDPProxy).CacheSize

I would like to know the powershell command to find if Go or To is selected on the list.

Thanks :)
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: CDP Proxy cache unit

Post by oleg.feoktistov »

Hi matteu,


Thanks for pointing it out. It is, indeed, not in VBRCDPProxy class. I'll discuss the possibility to add it there.
Meanwhile, you can get it with .NET:

Code: Select all

$proxy = Get-VBRCDPProxy -Name 'CDP Proxy'
$proxyInfo = [Veeam.Backup.Core.CCDPProxy]::Find($proxy.Id)
$proxyInfo.GetCdpHostComp().Options
Thanks,
Oleg
matteu
Veeam Legend
Posts: 822
Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:

Re: CDP Proxy cache unit

Post by matteu »

I know I open a lot of topic now but I hope it can also help to improve powershell veeam product :)
Thanks :)
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: CDP Proxy cache unit

Post by oleg.feoktistov »

A lot of good ones :wink: Thanks!
matteu
Veeam Legend
Posts: 822
Liked: 128 times
Joined: May 11, 2018 8:42 am
Contact:

Re: CDP Proxy cache unit

Post by matteu »

OK I just tried it now and it works :)

Code: Select all

    $VMwareCDPProxyReq = Get-VBRCDPProxy
    foreach ($element in $VMwareCDPProxyReq)
    {
        [pscustomobject]@{
            Name = $element.name
            Type = "vmware CDP"
            Disabled = -not $element.IsEnabled
            CacheSize =    [string]$element.CacheSize + " " + [Veeam.Backup.Core.CCDPProxy]::Find($element.Id).GetCdpHostComp().Options.SizeUnit
            CachePath = $element.CachePath  
        }
    }
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests