Get-SqlUserDefinedDataType

Gets an SMO UserDefinedDataType object.

Syntax

Get-SqlUserDefinedDataType [-database] <Database> [[-name] <String>] [<CommonParameters>]

Detailed Description

The Get-SqlUserDefinedDataType function gets a collection of SMO UserDefinedDataType objects for the specified database.

Related Commands

* Get-SqlUserDefinedDataType

Parameters

Name Description Required? Pipeline Input Default Value
database    true  true (ByValue)   
name    false  false   

Input Type

Microsoft.SqlServer.Management.Smo.Database You can pipe SMO database objects to Get-SqlUserDefinedDataType

Return Values

Microsoft.SqlServer.Management.Smo.UserDefinedDataType Get-SqlUserDefinedDataType returns a Microsoft.SqlServer.Management.Smo.UserDefinedDataType object.

Notes

Additional properties including the database, server and extended properties are included in the output.

Examples

EXAMPLE 1

Get-SqlUserDefinedDataType $(Get-SqlDatabase "Z002\sql2K8" pubs)
This command gets a collection of SMO UserDefinedDataType objects for SQL Server Z002\SQL2K8, pubs database.

EXAMPLE 2

Get-SqlDatabase "Z002\sql2K8" | Get-SqlUserDefinedDataType
This command gets a collection of SMO UserDefinedDataType objects for all user databases on SQL Server Z002\SQL2K8.

EXAMPLE 3

Get-SqlDatabase "Z002\sql2K8" pubs | Get-SqlUserDefinedDataType -name "empid"
This command gets an SMO UserDefinedDataType object for the empid user defined dataType in the pubs database on SQL Server Z002\SQL2K8.