5 Replies Latest reply on Mar 25, 2015 12:15 PM by LucD

    vCheck help - will not execute

    jessem Enthusiast

      I have been using Alan's vcheck report for quite some time with a domain read-only (vcenter) account and it has been working just fine.

       

      I created a new local account on the vcenter and gave that account vcenter read-only rights.  If I launch powercli and connect-viserver to the vcenter, it prompts me for a username and password which I enter, it connects on 443 to the vcenter just fine.


      However, in vCheck now, when I edit this line, it doesn't work.

       

      $VIConnection = Connect-VIServer $VIServer -user "user123" -Pass "user123" -Protocol Https

       

      When I execute the vcheck.ps1 script, I get:

       

      Cannot complete login due to an incorrect user name or password.

       

      Again, I'm absolutely sure I am using the right account and password.  I even changed the script line to use, -user "localhost\user123" and it still fails.


      What am I missing to get this script to run under the new local computer account?

        • 1. Re: vCheck help - will not execute
          LucD Guru
          Community WarriorsvExpertUser Moderators

          Would the password by any chance contain special characters ?

          Try placing the password between single quotes

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: vCheck help - will not execute
            jessem Enthusiast

            No, no special characters.  I did some more testing and it turns out the local user needs to be in the Power Users group on the local box (vCenter) in order to execute from a remote computer.

             

            The user was only in the "Users" group - as soon as I changed the groups, it worked right away!  thanks for taking the time to look at my post LucD.

            • 3. Re: vCheck help - will not execute
              jessem Enthusiast

              Actually, it did not work the way I wanted it too.

               

              If I remove the -user "user123" -Pass "user123" -Protcol Https

               

              from the script and then run it in PowerCLI, I get prompted for the username and password - which I then manually enter and the script executes ok.

               

              When I leave the -user and the -pass in the script, it fails and says bad username/password. 


              The password has no special characters.

               

              I tried it without double quotes and just single quotes on the password and it still failed.


              Any ideas?

              • 4. Re: vCheck help - will not execute
                jessem Enthusiast

                Nevermind LucD - nevermind - big stupid stupid mistake on my part and I'm embarrassed....sorry to waste your time!

                • 5. Re: vCheck help - will not execute
                  LucD Guru
                  Community WarriorsUser ModeratorsvExpert

                  No problem, glad you found it

                  Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz