Get-SqlVersion
Returns a custom object with the Server name and version number.
Syntax
Get-SqlVersion [-sqlserver] <Object> [<CommonParameters>]
Detailed Description
The Get-SqlVersion function returns a custom object with the Server name and version number for the specified SQL server.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
sqlserver |
|
true |
false |
|
Input Type
None
You cannot pipe objects to Get-SqlVersion
Return Values
Selected.Microsoft.SqlServer.Management.Smo.Information
Get-SqlVersion returns a Selected.Microsoft.SqlServer.Management.Smo.Information object.
Examples
EXAMPLE 1
Get-SqlVersion "Z002\sql2k8"
This command returns SQL version information for the Z002\sql2k8 SQL Server.