6 Replies Latest reply on Feb 9, 2015 10:17 AM by Burke-

    Import Workflow with PowerShell

    mwpreston Hot Shot

      So I've been working on a powershell script to export all of my workflows out of one vCO server and then import them back in to another

      I've got the export working great!


      That said, can't figure out the code to import back in - wondering if anyone knows how to do so....


      $body = "file=$(get-content C:\workflows\ConfigureNTP.zip -raw)"


      Invoke-RestMethod -URi $categoryuri -Method POST -body $body -Credential $cred

      -ContentType "application/zip" -Headers @{"Content-Disposition"="form-data";"name"="configureNTP";"filename"="configureNTP.zip";}


      Keep getting a 415 status - server refused this request because the request entity is in a format not supported by the requested resource for the requested method...


      I have no clue   - but I'm trying   Just wondering if anyone has accomplished this before with the Invoke-RestMethod cmdlet