CleanCode PowerShell Libraries v1.2.08 API: CleanCode » SqlTools » Out-DataTable
Specifies the objects to be converted to a DataTable.
If an array of objects is passed, any with a type that differs
from the first object in the list are ignored and a warning is displayed.
To suppress the warning, use the TypeFilter parameter to pre-filter the list to a single type.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
Specifies a selection filter by data type name.
If not specified, all objects are processed and those with differing types
generate a warning message.
If TypeFilter is specified, only those objects matching the type name are processed.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Adapted from script by Marc van Orsouw see link
Version History
v1.0 - Chad Miller - Initial Release
v1.1 - Chad Miller - Fixed Issue with Properties
v1.2 - Chad Miller - Added setting column datatype by property as suggested by emp0
v1.3 - Chad Miller - Corrected issue with setting datatype on empty properties
v1.4 - Chad Miller - Corrected issue with DBNull
v1.5 - Chad Miller - Updated example
v1.6 - Chad Miller - Added column datatype logic with default to string
This documentation set was created with CleanCode's DocTreeGenerator.