PowerShell script exchange
mdiver
Veeam Legend
Posts: 230 Liked: 37 times
Joined: Nov 04, 2009 2:08 pm
Contact:
Post
by mdiver » Feb 16, 2022 10:51 am
this post
oleg.feoktistov wrote: ↑ Jul 03, 2020 2:17 pm
Hi Mike,
First, CStorageToExtentAssociationService class is deprecated. So, remove the line below:
Code: Select all
$svc = [Veeam.Backup.Core.CStorageToExtentAssociationService]::new()
Then, pass storage id as the only argument to FindExtentRepo() method accordingly:
Code: Select all
$ext = $realsobr.FindExtentRepo($st.Id)
And you are good to go.
Cheers!
Oleg
Hi Oleg.
I fear with V11 we're once again out with the code. Could I ask you for an update?
Thanks and regards
Michael
oleg.feoktistov
Veeam Software
Posts: 2010 Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » Feb 16, 2022 2:46 pm
1 person likes this post
Hi Michael,
Looks like FindExtentRepo() method became static. So, you need to expand CExtendableRepository class directly to invoke it. For example:
Code: Select all
$backup = Get-VBRBackup
$storages = $backup.GetAllStorages()
foreach ($storage in $storages) {
$extent = [Veeam.Backup.Core.CExtendableRepository]::FindExtentRepo($storage.Id)
}
Best regards,
Oleg
mdiver
Veeam Legend
Posts: 230 Liked: 37 times
Joined: Nov 04, 2009 2:08 pm
Contact:
Post
by mdiver » Feb 17, 2022 3:20 pm
1 person likes this post
Thanks a lot, Oleg, for - once again - an ultra fast answer. The API seems to be in constant flow...
I just have to say this forum is outstanding, as it is maintained perfectly even in these undocumented areas.
oleg.feoktistov
Veeam Software
Posts: 2010 Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » Feb 17, 2022 8:45 pm
this post
Well, those are undocumented methods, but I'm trying to keep track on them anyway
Glad to know it helps.
Users browsing this forum: Amazon [Bot] and 18 guests