Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save blinds52/c74a1935e86307f992fda073cfe2eabd to your computer and use it in GitHub Desktop.

Select an option

Save blinds52/c74a1935e86307f992fda073cfe2eabd 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