Is there a way to prevent a user to run PowerCLI against your vCenter? I have a user that is write very bad scripts and causing performance issues a lot, yet I am unable to remove vCenter access for politics from the user.
AFAIK, this is not possible. Different roles for the same user just based on the medium of access (PowerCLI / Web Client) is not feasible yet. Might qualify as a feature request though
Please consider marking this answer as "correct" or "helpful" if you think your questions have been answered.
Cheers,
Supreet
Hi
No way to limit the vCenter access based on the application used to access it (web client/PowerCLI.)
All these use the same vSphere API under the covers.
See:
Block or Restricting execution of PowerCLI commands or Scripts
Please consider marking this answer "correct" or "helpful" if you think your question have been answered correctly.
Since the discussion linked to below, there have been some new features introduced for PowerShell.
The one you could be looking at would be JEA (Just Enough Administration).
It allows to restrict cmdlets for specific users.
The drawback, you will need to set up access through PowerCLI to the vSphere environment, via an endpoint.
See Just Enough Administration
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference