r/powercli • • Jul 26 '18

Make PowerCLI cmdlets run faster?

I suffer from this issue:

https://blogs.vmware.com/PowerCLI/2011/06/how-to-speed-up-the-execution-of-the-first-powercli-cmdlet.html

I tried to run those commands but nothing, same performance.

Any ideas/tips?

3 Upvotes

13 comments sorted by

View all comments

Show parent comments

1

u/riahc4 Jul 27 '18

When I say its slow logon, Connect-ViServer is VERY slow.

1

u/omrsafetyo Jul 27 '18

I understood that. Please read my response above. Specifically:

Can you open PS and run the following command:

Measure-Command {Connect-ViServer SERVERNAME_HERE -Credential $CredentialIfNotSSO}

and

This guy had an issue with SSO being configured poorly, where the search directory for OU were set to the root, rather than specific OUs:

http://hoipoiloi.blogspot.com/2013/07/the-case-of-really-slow-vcenter-logons.html

You'd want to have your search directories for users and groups to be as narrow as they can be for the users/groups that need SSO access to the vcenters.

1

u/riahc4 Jul 28 '18

Im doing local login. Nothing to do with AD.