Ready to get started?

Download a free trial of the Pinterest Cmdlets to get started:

 Download Now

Learn more:

Pinterest Icon Pinterest Cmdlets

An easy-to-use set of PowerShell Cmdlets offering real-time access to Pinterest. The Cmdlets allow users to easily read, write, update, and delete live data - just like working with SQL server.

Pipe Pinterest Data to CSV in PowerShell



Use standard PowerShell cmdlets to access Pinterest tables.

The CData Cmdlets Module for Pinterest is a standard PowerShell module offering straightforward integration with Pinterest. Below, you will find examples of using our Pinterest Cmdlets with native PowerShell cmdlets.

Creating a Connection to Your Pinterest Data

Pinterest authentication is based on the standard OAuth flow. To authenticate, you must initially create an app via the Pinterest developer platform where you can obtain an OAuthClientId, OAuthClientSecret, and CallbackURL.

Set InitiateOAuth to GETANDREFRESH and set OAuthClientId, OAuthClientSecret, and CallbackURL based on the property values for the app you created.

See the Help documentation for other OAuth authentication flows.

$conn = Connect-Pinterest  -OAuthClientId "$OAuthClientId" -OAuthClientSecret "$OAuthClientSecret" -CallbackURL "$CallbackURL"

Selecting Data

Follow the steps below to retrieve data from the Users table and pipe the result into to a CSV file:

Select-Pinterest -Connection $conn -Table Users | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myUsersData.csv -NoTypeInformation

You will notice that we piped the results from Select-Pinterest into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.

The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.