Skip to content
Marco van Gaal edited this page Aug 5, 2015 · 11 revisions

.NAME

Out-DataTable

.SYNOPSIS

Creates a DataTable for an object

.PARAMETERS

.INPUTS

Object Any object can be piped to Out-DataTable

.OUTPUTS

System.Data.DataTable

.NOTES

 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 
 v1.7 - Chad Miller - Fixed issue with IsArray

.RELATED LINKS

http://thepowershellguy.com/blogs/posh/archive/2007/01/21/powershell-gui-scripblock-monitor-script.aspx

Clone this wiki locally