Skip to content

Instantly share code, notes, and snippets.

@zaneGittins
Created August 26, 2020 17:16
Show Gist options
  • Save zaneGittins/78711f0405a0176d219b1b79ca27b9f3 to your computer and use it in GitHub Desktop.
Save zaneGittins/78711f0405a0176d219b1b79ca27b9f3 to your computer and use it in GitHub Desktop.
Export WEF Subscriptions
function Export-WEFSubscription {
[CmdletBinding()]
param (
[Parameter(Mandatory=$false)][array]$OutputDirectory = (Get-Location)
)
# Get all subscriptions.
$Subscriptions = wecutil es
# Export to xml.
foreach($Subscription in $Subscriptions) {
wecutil gs $Subscription /f:xml >>"$OutputDirectory\$Subscription.xml"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment