Search code examples
sqlsql-serverpowershellversion

How do I check for the SQL Server Version using Powershell?


What's the easiest way to check for the SQL Server Edition and Version using powershell?


Solution

  • Invoke-Sqlcmd -Query "SELECT @@VERSION;" -QueryTimeout 3
    

    http://msdn.microsoft.com/en-us/library/cc281847.aspx