alanrenouf / vCheck-vSphere

vCheck Daily Report for vSphere
MIT License
732 stars 326 forks source link

Issue with credentials #655

Open AMS76 opened 5 years ago

AMS76 commented 5 years ago

Hi,

We have a Windows vCenter, that is NOT part of an AD domain. However, domain credentials are used to access vCenter. I've entered alternate credentials, so much of the script runs. However, vCheck failes on reading the Windows event logs, since this should be done with the user credentials the script is running, and not the alternate vCenter credentials.

Any ideas how to change/resolve this?

a13xchan commented 5 years ago

Just edit the connection script to include the -user and -password.

Connect-VIServer -Server .... add the creds after this in the config file (just as though you were logging into vcenter via powershell as a different user). Then it doesnt matter who runs the script, the script will use whatever creds are in the config file to produce the report.