Get-SqlStatistic
Gets an SMO Statistic object.
Syntax
Get-SqlStatistic [-table] <Object> [<CommonParameters>]
Detailed Description
The Get-SqlStatistic function gets a collection of SMO Statistic objects for the specified table or view.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
table |
|
true |
true (ByValue) |
|
Input Type
Microsoft.SqlServer.Management.Smo.Table or
Microsoft.SqlServer.Management.Smo.View
You can pipe SMO objects to Get-SqlStatistic
Return Values
Microsoft.SqlServer.Management.Smo.Statistic
Get-SqlStatistic returns a Microsoft.SqlServer.Management.Smo.Statistic object.
Notes
Additional properties including the database, server and extended properties are included in the output.
Examples
EXAMPLE 1
Get-SqlDatabase "Z002\sql2k8" "Northwind" | Get-SqlTable | Get-SqlStatistic
This command gets a collection of SMO Statistic objects for all user tables in the Northwind database.