Out-DataTable



Out-DataTable

SYNOPSIS

Creates a DataTable for an object

SYNTAX

Out-DataTable [-InputObject] <PSObject[]> [-NonNullable <String[]>] [<CommonParameters>]

DESCRIPTION

Creates a DataTable based on an object's properties.

EXAMPLES

EXAMPLE 1

$dt = Get-psdrive | Out-DataTable
# This example creates a DataTable from the properties of Get-psdrive and assigns output to $dt variable

EXAMPLE 2

Get-Process | Select Name, CPU | Out-DataTable | Invoke-SQLBulkCopy -ServerInstance $SQLInstance -Database $Database -Table $SQLTable -force -verbose

PARAMETERS

InputObject

NonNullable

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.

Last updated