PsDac connects DacFx and PowerShell. It gives you PowerShell Cmdlets with the power of Microsoft.SqlServer.DacFx.
Returns the data type of a column.
Get-DacDataType [-Column] <TSqlObject> [<CommonParameters>]
Provides the datatype and properties to a column.
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
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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.