PowerShell script exchange
matteu
Veeam Legend
Posts: 860 Liked: 136 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Jun 15, 2021 2:13 pm
this post
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: 2025 Liked: 674 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » Jun 16, 2021 4:15 pm
this post
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: 860 Liked: 136 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Jun 17, 2021 11:02 am
this post
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: 2025 Liked: 674 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » Jun 17, 2021 5:29 pm
this post
A lot of good ones
Thanks!
matteu
Veeam Legend
Posts: 860 Liked: 136 times
Joined: May 11, 2018 8:42 am
Contact:
Post
by matteu » Jun 18, 2021 3:09 pm
this post
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
}
}
Users browsing this forum: No registered users and 11 guests