PsDac

PsDac connects DacFx and PowerShell. It gives you PowerShell Cmdlets with the power of Microsoft.SqlServer.DacFx.

View the Project on GitHub abbgrade/PsDac

Get-DacDataType

SYNOPSIS

Returns the data type of a column.

SYNTAX

Get-DacDataType [-Column] <TSqlObject> [<CommonParameters>]

DESCRIPTION

Provides the datatype and properties to a column.

EXAMPLES

Example 1

PS C:\> Import-DacModel -Path ./WideWorldImporters.dacpac | Get-DacTable -Name '[Application].[Cities]' | Get-DacColumn -Name '[Application].[Cities].[CityID]' | Get-DacDataType


Name       : Int
Length     : 0
Precision  : 0
Scale      : 0
IsNullable : False
IsMax      : False
Collation  :
_detail    : Microsoft.SqlServer.Dac.Model.TSqlObject

PARAMETERS

-Column

Specifies the column to get the data type from. The ObjectType must be Column.

Type: TSqlObject
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.SqlServer.Dac.Model.TSqlObject

OUTPUTS

PsDac.GetDataTypeCommand+ColumnInfo

NOTES

TSqlObject

Column