Flings
Apps and tools built by our engineers that are intended to be played with and explored.

vCenter 5.1 Pre-Install Check Script

vCenter 5.1 Pre-Install Check Script

Summary

This is a PowerShell script written to help customers validate their environment and assess if it is ready for a 5.1.x upgrade. The script checks against known misconfiguration and issues raised with VMware Support.

This script checks the Windows Server and Active Directory configuration and provides an on screen report of known issues or configuration issues, the script also provides a text report which can help with further trouble shooting.

For more information, read New Fling: vCenter 5.1 Pre-Install Check Script
PreInstallCheck_screen

System Requirements

The following system requirements will need to be met for this script to run correctly:

  • Windows 2003/ Windows 2008/2008 R2 on 64bit in a domain environment.
  • .Net Framework 3.5.0 or above
  • PowerShell 2.0 or above
  • PowerShell must be able to run scripts (Execution Policy must be assigned correctly)
  • PowerCLI 5.1 is required for an upgrade scenario.
  • PowerShell must be launched as Administrator
  • Run in 64 Bit PowerShell (Do not run in PowerShell (x86))

Instructions

Because this is a script, it's incredibly easy to run this script.

  1. Download the script file to the local disk
  2. Launch PowerShell from the start menu
  3. CD to the location of the downloaded script file and launch the script, for example:
    • PS C:\>cd Scripts
    • PS C:\Scripts>.\PreInstallCheckv2.ps1
  4. The script will run and a graphical application will be launched
  5. If this script is being used to check an upgrade of vCenter from a previous version please enter the hostname of the vCenter server in the text box provided, if this is not the case then do not change this box
  6. Click “Run Checks”
  7. Once completed it is suggested you check each result box to find the result information and click the “More Information” link to read more information about this potential issue.

Note: Results may vary and some checks may not work on systems configured with IPv6.

Video

Change Log

Engineers

Alan Renouf

Infrastructure Product Marketing
Add Comment

35 thoughts on “vCenter 5.1 Pre-Install Check Script

    1. Alan Renouf

      No, this information was fed back into the install team for the 5.5 release, the installer should now be improved to check a number of these items.

      Reply
  1. Dusan

    We have “service” user for installing vCenter which is domain user and local administrator on vCenter server.
    With service account i have issues with enough permissions, but with domain admin user works fine.

    Reply
  2. Harold

    Hi Alan,

    looks great as always!

    I have not had the time to run the script, but does it also check for not supported ESX versions ?
    ( vCenter 5.1 will no longer support ESX 3.5 I believe? )

    Cheers,

    Harold

    Reply
  3. Sean

    I tried out this script this morning and I’m getting an error that it isn’t digitally signed. I’m new to all things vmware so I’m not sure where I went wrong. Thanks

    Reply
    1. ChuckD

      Have you set the execution policy to remote signed? Open powershell and run the command:

      Set-ExecutionPolicy RemoteSigned

      Then confirm.

      Reply
        1. Alan Renouf

          Sean,

          It does sound like the execution policy isn’t correct, just before you run the script do a get-executionpolicy and make sure it is RemoteSigned or Unrestricted.

          If you still get this then please paste the error into the comments here and I will take a look.

          Thanks

          Reply
          1. Sean

            PS C:\Windows\system32> Get-ExecutionPolicy
            RemoteSigned
            PS C:\Windows\system32> Set-ExecutionPolicy RemoteSigned

            Execution Policy Change
            The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
            you to the security risks described in the about_Execution_Policies help topic. Do you want to change the execution
            policy?
            [Y] Yes [N] No [S] Suspend [?] Help (default is “Y”): Y
            PS C:\Windows\system32> cd C:\Script
            PS C:\Script> cd .\Pre-InstallCheckv2
            PS C:\Script\Pre-InstallCheckv2> .\PreCheckv2.ps1
            File C:\Script\Pre-InstallCheckv2\PreCheckv2.ps1 cannot be loaded. The file C:\Script\Pre-InstallCheckv2\PreCheckv2.ps1
            is not digitally signed. The script will not execute on the system. Please see “get-help about_signing” for more detai
            ls..
            At line:1 char:17
            + .\PreCheckv2.ps1 <<<

            Reply
            1. Alan Renouf

              Wow, that’s strange!

              The only other thing I can think is that the script is blocked at the moment, if you right click on the PS1 file and then look at the general tab is there an unblock button near the bottom? If so click it.

              Reply
  4. ChuckD

    Hi, Alan. Thanks for this script. We’re looking to migrate to v5.1 in the very near future and this is extremely helpful. However, I’m running into a bit of a problem. The script hangs on different iterations of the ping checks every time I run it. I meet all the pre-reqs:

    Windows 2008/2008 R2 on 64bit in a domain environment.
    .Net Framework 3.5.0 installed
    PowerShell 2.0 installed
    PowerShell execution policy is set to RemoteSigned
    PowerCLI 5.1 is being used
    PowerShell Administrator (as well as a domain administrator – made no difference)
    Running in 64 Bit PowerShell

    DNS resolution is correct forward and backward; verified by nslookup. Currently, it’s hanging at the ping check after “Domain name system resolution (DNS) check” however, I’ve gotten farther than that before. The farthest I’ve gotten is the ping check after the third (and last) “Local DC DNS check.”

    The odd thing is that if I stop the script via ctrl+c, the results window shows all the ping checks to be successful. Of course, I can manually ping all three DC’s just fine from the server that’s running the script. I’ve followed the video to the letter. From the results that I can see, I’ve got no errors other than a couple informational things.

    Any thoughts or suggestions?

    Thanks for your time.

    Reply
    1. Alan Renouf

      Chuck,

      Unfortunately because the way PowerShell works with Winforms it can look like the script is hanging sometimes, I added the status to the PowerShell window as well so just try and give it some time and let it keep working, it should turn out ok at the end. Keep an eye on the initial PowerShell window to track the progress of the script.

      Reply
      1. ChuckD

        Okey doke, Alan. I’ll fire it off and let it run for a while. I’ll report back.

        Again, thanks for your time and efforts on this. After researching the problems encountered w/the SSO install, I’m concerned that it’ll be a roadblock to our successful move to v5.1. The initial results from this script look promising, so hopefully things will turn out well.

        Reply
  5. Joe

    Can it be something with ADWS on our DC’s? I get this error when trying to import AD module:
    PS C:\> Import-Module ActiveDirectory
    WARNING: Error initializing default drive: ‘Unable to find a default server with Active Directory Web Services running.’.

    Reply
      1. Dave

        I don’t understand why you would write a pre-req check script this way. Please realize a lot of large enterprises do not allow everyone to be a domain admin. Take a guess what our domain admins would say if I walked into their office and asked one of them to run some script I downloaded from the Internet with elevated credentials? If the service does not have to run under that security context I don’t understand the need for the elevated access.

        Reply
        1. Alan Renouf

          Dave, I understand your frustration but I was trying to give people a helping hand with this script, something to give them more information than they currently have. Thanks for your comments and I always look for ways to make my scripts easier and convenient to run. I will look for a way to not require these permissions.

          Reply
          1. Richard

            I am a domain admin. First let me say that I trust the script….. I will read it, then I will run it in my test lab.
            Then I will run the script in production.

            If you are not a domain admin, you probably shouldn’t be running scripts acainst the DC’s. You can show it to your domain admins, if they have a closed mind and are unable to evaluate the script, too bad, you don’t have good domain admins.

            Thanks for all your work /Help Alan.

            Reply
  6. Todd

    Alan,

    Thank you for sharing, I have configured everything and it is running fine.

    One thng, is there any plans for developing it where I can copy the file to a remote machine that is not part of the network (AD), run the script from a remote machine where I have internal access to the Vsphere server and it give me the option of selecting the machine I want to check with AD, vsphere and others. I say this because I could use this as a remote validation tool where I have access to the internal network. Are there any plans to expand the capability of the script because I see a number of wonderful uses.

    Please advise.

    Todd

    Reply
    1. Alan Renouf

      Todd,

      No, the idea behind this script is that is should be run on the same machine you will be installing SSO, that could be the same server as vCenter or a separate server, it must also be run with the account you will use to run the setup when you upgrade to 5.1

      Reply
  7. ZSoltesz

    I have the same issue with this script. I am admin on the vCenter server, I have downloaded the newest PowerCLI, and I use Powershell 2.0 and Windows 2008 R2.
    Is it possible that the problem is caused by language settings? For example we use Hungarian settings.

    Zoli

    Reply
  8. stewart

    This is a great script but I’m getting the below error are you able to advise what I need access to to get this running. Thanks

    System.Management.Automation.CmdletInvocationException: Access is denied

    Full error:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.Management.Automation.CmdletInvocationException: Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED)) —> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0×80070005 (E_ACCESSDENIED))
    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    at System.Management.ManagementScope.InitializeGuts(Object o)
    at System.Management.ManagementScope.Initialize()
    at System.Management.ManagementObjectSearcher.Initialize()
    at System.Management.ManagementObjectSearcher.Get()
    at Microsoft.PowerShell.Commands.GetWmiObjectCommand.BeginProcessing()
    at System.Management.Automation.Cmdlet.DoBeginProcessing()
    at System.Management.Automation.CommandProcessorBase.DoBegin()
    — End of inner exception stack trace —
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
    at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
    at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)
    at System.Management.Automation.AssignmentStatementNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)
    at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)

    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4984 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    —————————————-
    Microsoft.PowerShell.ConsoleHost
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.PowerShell.ConsoleHost/1.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.ConsoleHost.dll
    —————————————-
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4985 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Management.Automation
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Management.Automation/1.0.0.0__31bf3856ad364e35/System.Management.Automation.dll
    —————————————-
    Microsoft.PowerShell.Commands.Diagnostics
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Diagnostics/1.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Diagnostics.dll
    —————————————-
    System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.4926 built by: NetFXw7
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
    —————————————-
    System.Configuration.Install
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration.Install/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
    —————————————-
    Microsoft.WSMan.Management
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.WSMan.Management/1.0.0.0__31bf3856ad364e35/Microsoft.WSMan.Management.dll
    —————————————-
    System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    —————————————-
    Microsoft.PowerShell.Commands.Utility
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Utility/1.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Utility.dll
    —————————————-
    Microsoft.PowerShell.Commands.Management
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.PowerShell.Commands.Management/1.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Commands.Management.dll
    —————————————-
    Microsoft.PowerShell.Security
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.PowerShell.Security/1.0.0.0__31bf3856ad364e35/Microsoft.PowerShell.Security.dll
    —————————————-
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    —————————————-
    System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
    —————————————-
    System.DirectoryServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4985 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.DirectoryServices/2.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
    —————————————-
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    —————————————-
    Microsoft.ActiveDirectory.Management
    Assembly Version: 6.1.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_64/Microsoft.ActiveDirectory.Management/6.1.0.0__31bf3856ad364e35/Microsoft.ActiveDirectory.Management.dll
    —————————————-
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    —————————————-
    System.DirectoryServices.Protocols
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4985 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.DirectoryServices.Protocols/2.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.Protocols.dll
    —————————————-
    System.ServiceModel
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.4506.5007 (Win7RTMGDR.030729-5000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceModel/3.0.0.0__b77a5c561934e089/System.ServiceModel.dll
    —————————————-
    System.Runtime.Serialization
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.4506.5007 (Win7RTMGDR.030729-5000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Serialization/3.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
    —————————————-
    SMDiagnostics
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.4506.5007 (Win7RTMGDR.030729-5000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/SMDiagnostics/3.0.0.0__b77a5c561934e089/SMDiagnostics.dll
    —————————————-
    System.IdentityModel
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.4506.5007 (Win7RTMGDR.030729-5000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.IdentityModel/3.0.0.0__b77a5c561934e089/System.IdentityModel.dll
    —————————————-
    Microsoft.BackgroundIntelligentTransfer.Management.Interop
    Assembly Version: 6.1.0.0
    Win32 Version: 7.5.7600.16385 (win7_rtm.090713-1255)
    CodeBase: file:///C:/Windows/system32/WindowsPowerShell/v1.0/Modules/BitsTransfer/Microsoft.BackgroundIntelligentTransfer.Management.Interop.dll
    —————————————-
    Microsoft.BackgroundIntelligentTransfer.Management
    Assembly Version: 1.0.0.0
    Win32 Version: 6.1.7600.16385
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.BackgroundIntelligentTransfer.Management/1.0.0.0__31bf3856ad364e35/Microsoft.BackgroundIntelligentTransfer.Management.dll
    —————————————-
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4985 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4985 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-
    System.ServiceProcess
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceProcess/2.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
    —————————————-
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    —————————————-

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    Reply
        1. Craig

          I am getting same error. I have all the pre-reqs and am running it with a user that has permissions. The only difference from your online video is I am running SSO on a separate server from my vCenter Server.

          Reply
              1. Craig

                Our security policies will not allow us to run as a Domain Admin. I ran it with a user that was Administrator on the SSO and the vCenter server.

                Reply
                1. Craig

                  I was able to have one of our Domain Admins run it and it worked fine. Is there a list of the other specific permissions so I can have them let my account run it?

                  Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>