-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
find Login for each managed server
Hello,
I would like to find each credentials for each managed server but I find it only for vcenter
ie : If I have vcenter server, I can find it with :
(Get-VBRServer -name "vcenter").GetSoapCreds().user
If I have linux, I can fint it with :
(Get-VBRCredentials | where {$_.id -eq $lin.GetSshCreds().credsid.guid}).name
How can I do for ESXi / scvmm / hyper-v ?
Thanks for your help.
I would like to find each credentials for each managed server but I find it only for vcenter
ie : If I have vcenter server, I can find it with :
(Get-VBRServer -name "vcenter").GetSoapCreds().user
If I have linux, I can fint it with :
(Get-VBRCredentials | where {$_.id -eq $lin.GetSshCreds().credsid.guid}).name
How can I do for ESXi / scvmm / hyper-v ?
Thanks for your help.
-
- Veeam Vanguard
- Posts: 282
- Liked: 113 times
- Joined: Apr 20, 2017 4:19 pm
- Full Name: Joe Houghes
- Location: Castle Rock, CO
- Contact:
Re: find Login for each managed server
For ESXi and Hyper-V, you can use the FindDbCredentialsWithParent method.
I don't have an SCVMM host in our lab to confirm, but you should be able to pull it with one of the Find* methods.
ESXi:
Hyper-V:
I don't have an SCVMM host in our lab to confirm, but you should be able to pull it with one of the Find* methods.
ESXi:
Code: Select all
PS C:\Users\joe.houghes\Documents> $servers[0] | Select Name, Type
Name Type
---- ----
adcseesx14.usdemo.veeam.local ESXi
PS C:\Users\joe.houghes\Documents> $servers[0].FindDbCredentialsWithParent()
Info Id Credentials
---- -- -----------
Veeam.Backup.Model.CDbCredentialsInfo 25ca4032-53ba-4f44-b058-60c05ea61ee9 Veeam.Backup.Common.CCredentials
Code: Select all
PS C:\Users\joe.houghes\Documents> $servers[-6] | Select Name, Type
Name Type
---- ----
ATLHyperV01 HvServer
PS C:\Users\joe.houghes\Documents> $servers[-6].FindDbCredentialsWithParent()
Info Id Credentials
---- -- -----------
Veeam.Backup.Model.CDbCredentialsInfo 3a0e5ca4-9e01-46b4-a8fe-6d9dfd7039d2 Veeam.Backup.Common.CCredentials
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
Thank you for your answer.
Unfortunately, it doesn"t work for me :
Unfortunately, it doesn"t work for me :
Code: Select all
PS C:\Users\administrateur.PRODUCTION> $a=Get-VBRServer -Name "192.168.1.2"
PS C:\Users\administrateur.PRODUCTION> $a
Info : 192.168.1.2 (VMware ESXi server)
ParentId : 4d7ed677-2cdc-4286-a6ef-50cad6141109
Id : f058de4c-02f2-45e3-ad5e-64ea44df4e5b
Uid : f058de4c02f245e3ad5e64ea44df4e5b
Name : 192.168.1.2
Reference : host-323
Description :
IsUnavailable : False
Type : ESXi
ApiVersion : V672
PhysHostId : f2b0d56e-fa22-4fca-b83d-5d9d69034fcc
ProxyServicesCreds :
PS C:\Users\administrateur.PRODUCTION> $a.FindDbCredentialsWithParent()
PS C:\Users\administrateur.PRODUCTION>
-
- Veeam Vanguard
- Posts: 282
- Liked: 113 times
- Joined: Apr 20, 2017 4:19 pm
- Full Name: Joe Houghes
- Location: Castle Rock, CO
- Contact:
Re: find Login for each managed server
Try just .FindCredentials()
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
Same result
Code: Select all
PS C:\Users\administrateur.PRODUCTION> $a.FindCreds()
PS C:\Users\administrateur.PRODUCTION>
-
- Veeam Software
- Posts: 723
- Liked: 185 times
- Joined: Jun 05, 2013 9:45 am
- Full Name: Johan Huttenga
- Contact:
Re: find Login for each managed server
Are the hosts perhaps part of a cluster that you've already joined to VBR? The credentials would be stored there instead. For example, an ESXi host that is already joined to vCenter or a Hyper-V host that is part of a cluster may not return a value for FindCreds() - at least that is what happens for some of the servers in my environment.
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
I don't have any cluster. It's only 1 vcenter + 1 esxi on this vcenter.
But I have 2 objects in my VBR. I have vcenter from one side and the ESXi on the other side. ESXi connection is done with root account on GUI. I would like to retrieve this information with powershell.
But I have 2 objects in my VBR. I have vcenter from one side and the ESXi on the other side. ESXi connection is done with root account on GUI. I would like to retrieve this information with powershell.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: find Login for each managed server
Hi,
Try the methods below. Tested in v11.
For ESXi:
For Hyper-V:
Don't have SCVMM server in my lab, but I think FindCreds() method should be working on that server type as well.
Thanks,
Oleg
Try the methods below. Tested in v11.
For ESXi:
Code: Select all
$esxi = Get-VBRServer -Name 'esxi-01'
$esxiCreds = $esxi.GetSoapCreds()
Get-VBRCredentials | where {$_.Id -eq $esxiCreds.CredsId}
Code: Select all
$hyperv = Get-VBRServer -Name 'hyper-v'
$hypervCreds = $hyperv.FindCreds()
Get-VBRCredentials | where {$_.Id -eq $hypervCreds.Id}
Thanks,
Oleg
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
Hello,
It doesn't work
I'm on V11 too
It doesn't work
I'm on V11 too
Code: Select all
PS C:\Users\administrateur.PRODUCTION> $esxi = Get-VBRServer -Name '192.168.1.2'
$esxiCreds = $esxi.GetSoapCreds()
Get-VBRCredentials | where {$_.Id -eq $esxiCreds.CredsId}
PS C:\Users\administrateur.PRODUCTION> $esxi
Info : 192.168.1.2 (VMware ESXi server)
ParentId : 4d7ed677-2cdc-4286-a6ef-50cad6141109
Id : f058de4c-02f2-45e3-ad5e-64ea44df4e5b
Uid : f058de4c02f245e3ad5e64ea44df4e5b
Name : 192.168.1.2
Reference : host-323
Description :
IsUnavailable : False
Type : ESXi
ApiVersion : V672
PhysHostId : f2b0d56e-fa22-4fca-b83d-5d9d69034fcc
ProxyServicesCreds :
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: find Login for each managed server
Do $esxiCreds.User and $esxiCreds.CredsId contain any values upon GetSoapCreds() method invocation? Does $hyper.FindCreds() method work? Thanks!
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
Nothing when I try
$esxiCreds.User -> nothing
$esxiCreds.CredsId -> I have
Guid
----
00000000-0000-0000-0000-000000000000
I don't understand why I don't see any credentials xD
$esxiCreds.User -> nothing
$esxiCreds.CredsId -> I have
Guid
----
00000000-0000-0000-0000-000000000000
I don't understand why I don't see any credentials xD
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
OK, I think I find my issue.
If I write Get-VBRServer | where {$_.type -eq "ESXi"} I have my ESX but in Veeam console it's not present as standalone ESXi. It's only present as ESXi attached to vcenter.
I can't add it as standalone ESX because veeam says me : Server already present.
Is it not possible to have ESXi as standalone if it's vcenter member and the vcenter is included as veeam vcenter server ?
I build new ESXi to test and add it to Veeam managed server and I can see credentials used with command :
If I write Get-VBRServer | where {$_.type -eq "ESXi"} I have my ESX but in Veeam console it's not present as standalone ESXi. It's only present as ESXi attached to vcenter.
I can't add it as standalone ESX because veeam says me : Server already present.
Is it not possible to have ESXi as standalone if it's vcenter member and the vcenter is included as veeam vcenter server ?
I build new ESXi to test and add it to Veeam managed server and I can see credentials used with command :
Code: Select all
$ESXIServersManagedReq = Get-VBRServer | where {$_.type -eq "ESXi"}
foreach ($ESXIServer in $ESXIServersManagedReq){
$ESXIServer.GetSoapCreds().user
}
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: find Login for each managed server
Yes, that's the case. You can either add vCenter as a managed one with attached ESXi host or ESXi host as a standalone, even if it is a part of vCenter, but not both. Credentials are linked to a managed entity you added directly. Thanks!
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
I can understand it but is it normal with get-vbrserver I can see the vcenter ESXi member ?
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: find Login for each managed server
Yes, it is implemented like that to allow other operations with child ESXis. For instance, choose them as a target for a VM Restore. Thanks!
-
- Veeam Legend
- Posts: 823
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: find Login for each managed server
ok thank you
Who is online
Users browsing this forum: No registered users and 10 guests