Skip to content

Instantly share code, notes, and snippets.

@orosandrei
Created November 21, 2017 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save orosandrei/dea48adb8c07259b5aaedd8a7c1953a3 to your computer and use it in GitHub Desktop.
Save orosandrei/dea48adb8c07259b5aaedd8a7c1953a3 to your computer and use it in GitHub Desktop.
Powershell Workflow - export to Xaml file
#powershell workflow - export to xaml file
workflow PsWfExample {
param([String[]]$Services)
foreach -parallel ($svc in $Services){
$svc
}
}
#get the serialized xaml content
$MyPsWorkflow = Get-Command PsWfExample | select -ExpandProperty XamlDefinition
#write the xaml to a file
$MyPsWorkflow | Set-Content -path "C:\XamlWorkflows\PsWfExample.xaml" -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment