title: Call Azure Cosmos DB UDF function from a powershell script
body: <p>I have a UDF function in Cosmos DB , it takes a parameter and returns the documents that meets the condition based on the parameter. </p>
  
  <p>Each document returned by this UDF has 3 fields,</p>
  
  <ul>
  <li>Customer ID</li>
  <li>Modified Date</li>
  <li>Customer Status</li>
  </ul>
  
  <p>I need this information in a SQL Server SP present in another database. </p>
  
  <p>I am thinking of having a powershell script to bring this data from the Cosmos DB , store it in a table local to the SQL server database , and then use this table eventually in the SP. </p>
  
  <p>I wondering if my above approach to fetch data from Cosmos DB to SQL Server database is right, and if so could I know if we can execute a cosmos DB UDF from a powershell script and use the result set returned by the UDF.</p>