VMware

vRO using .CSV files for PowerShell Scripts Question/Issue

I am familiar with PowerCLI but not so much vRO yet. My company wants me to use vRO to kick off this script. I know down the road I should convert it to native vRO modules of VMware, and using a .CSV probably not the best thing. But I want to at least get it working for now.

I have put my PowerShell script on the connected PowerShell host. And made a input for a mime attachment. When I run the workflow the output from the PSHost says it doesn’t recognize my attachment. Part of the error says:

-csvfile MimeAttachment:ch.dunes.scripting.jsmodel.JSMimeAttachment@2dba85ee

Why is it not my regular .csv file here?

So I guess my question is can vRO put this file on my PSHost to execute the powershell script correctly as if I put the file there myself? Ex. “.\Script.ps1 -CSVFile File.csv”

Looking online for this question I have found that I need to do more scripting in vRO/what I’m trying to do is not possible.


View Reddit by varidianView Source

Related Articles

One Comment

  1. You absolutely can do that – you could also allow the user to place the file on a share to then point your command at, instead of putting the file on the pshost.

    ​

    There’s probably another workflow you could invoke to accept a file input and place it on the pshost, but the way you’re describing this, i think a shared location may be best.

    What’s the source of the data?

Leave a Reply

Your email address will not be published. Required fields are marked *

Close