cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dewaltk
New Member

Pharsing CSV data to PowerShell script in Azure automation runbook

I am busy working on a flow which exports data for assets from ServiceNow. I then use the Azure Create Job from the Azure Automation actions to pass the information to a runbook in Azure which runs a PowerShell script to configure the items for me.

 

The overall flow is working but I am looking for a way to optimize the PowerShell script execution portion of the flow. Currently the Azure Automation create job action runs in a Apply to Each action which causes the PowerShell job to trigger a separate job for each asset exported from ServiceNow which takes about 2 minutes to complete per item.

 

I am trying get all assets exported from ServiceNow into a variable which can be passed to PowerShell and have the PowerShell execute using a ForEach loop as you would do when using a CSV file for bulk configurations in PowerShell.

 

I was able to get all the data into a CSV table and also tried in a variable, but the data gets passed as a single string to the Azure job instead of a header with rows of values.

0 REPLIES 0

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,292)