![]() The following line deletes any records that match the criteria: The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the We do this because the CData Cmdlets append Connection, Table, andĬolumns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file. ![]() You will notice that we piped the results from Select-OData into a Select-Object cmdlet and excluded some propertiesīefore piping them into an Export-Csv cmdlet. Select-OData -Connection $conn -Table Orders | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myOrdersData.csv -NoTypeInformation $conn = Connect-OData -URL "$URL" -UseIdUrl "$UseIdUrl" -OData Version "$OData Version" -Data Format "$Data Format"įollow the steps below to retrieve data from the Orders table and pipe the result into to a CSV file: ![]() In addition, you will need to specify a URL to a valid OData server organization root or The User and Password properties, under the Authentication section, must be set to valid OData userĬredentials. PowerShell module offering straightforward integration with OData.įind examples of using our OData Cmdlets with native PowerShell cmdlets.Ĭreating a Connection to Your OData Services The CData Cmdlets Module for OData is a standard
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |