vmware / PowerCLI-Example-Scripts

http://blogs.vmware.com/powercli
Other
754 stars 603 forks source link

vSphere.VMware.SsoAdmin - some improvements #420

Closed philiprusinov closed 3 years ago

philiprusinov commented 3 years ago

Hello, Could you please implement "-SecondaryUrl" on Get-IdentitySource cmdlet, as you did it on Add-LDAPIdentitySource. This will give possibility to pipe Get-IdentitySource | Set-LDAPIdentitySource -Certificates and update certificates on environments, where 2 DCs are in use. Currently Get-IdentitySource is querying only the primary DC, so update certificate is not possible if in the current configuration you have 2 DCs. Could you please also add Remove-LDAPIdentitySource cmdlets? Thanks!

dmilov commented 3 years ago

I'll prepare new version of the module that includes this request

dmilov commented 3 years ago
Get-IdentitySource -External

Type                   : ActiveDirectory
Alias                  : sof-powercli-qe
AuthenticationType     : password
AuthenticationUsername : administrator@sof-powercli-qe
FriendlyName           : sof-powercli-qe
PrimaryUrl             : ldap://sof-powercli-qe.eng.vmware.com:389
FailoverUrl            :
UserBaseDN             : CN=Users,DC=sof-powercli-qe,DC=eng,DC=vmware,DC=com
GroupBaseDN            : CN=Users,DC=sof-powercli-qe,DC=eng,DC=vmware,DC=com
Name                   : sof-powercli-qe.eng.vmware.com

It is possible to filter out the results of Get-IdentitySource by this property the following way

Get-IdentitySource -External | Where-Object {$_.FailoverUrl -like '<search pattern>'}
Get-IdentitySource -External | Remove-IdentitySource

Fixed in version 1.2.3 available on GitHub and PSGallery

philiprusinov commented 3 years ago

Thank you Dimitar!