PowerShell script exchange
Post Reply
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Method GetUniqueInstanceId()

Post by masonit »

Hi

There is a method called GetUniqueInstanceId for get-vbrserver objects. How should the syntax be for the method? Want to use it on a vcenter.

\Masonit
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Method GetUniqueInstanceId()

Post by veremin »

Can you tell me what you're trying to achieve? May be there is a more obvious way to do that (in comparison with using internal undocumented object methods)? Thanks!
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: Method GetUniqueInstanceId()

Post by masonit »

Trying to get from veeam vcenter Instance UUID. When using Find-VBRViEntity I get property ConnHostId. But that Id does not seem to be vcenter Instance UUID. I can get the id with powercli but also want to collect it from Veeam if possible.

$vcenter = Connect-viserver <vcenter>
$vcenter.InstanceUuid

\Masonit
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Method GetUniqueInstanceId()

Post by veremin »

Is this something you're after?

Code: Select all

asnp VeeamPSSnapin
$Vcenter = Find-VBRViEntity -name "Name of your vCenter"| where {$_.type -eq "vc"}
$Vcenter.GetHost().Info.HostUniqueId
Thanks!
masonit
Service Provider
Posts: 325
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: Method GetUniqueInstanceId()

Post by masonit »

Yes, thanks! :)

\Masonit
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests