Skip to content

Instantly share code, notes, and snippets.

@mattwoolnough
Created July 3, 2016 23:40
Show Gist options
  • Save mattwoolnough/45592082354d7db6b2758a3152b0b0db to your computer and use it in GitHub Desktop.
Save mattwoolnough/45592082354d7db6b2758a3152b0b0db to your computer and use it in GitHub Desktop.
param
(
[parameter(mandatory = $true)] $email
,[parameter(mandatory = $true)] $account
,[parameter(mandatory = $false)] $DemoIndex
)
[System.Diagnostics.Debug]::Write("Starting PowerShell WF")
$domainAndAccount = "FIMDEV\" + $account
if(@(Get-PSsnapin | where-object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {add-pssnapin FIMAutomation}
$template = Get-AuthenticationWorkflowRegistrationTemplate -AuthenticationWorkflowName "Password Reset AuthN Workflow"
$usertemplate = $template.Clone()
$usertemplate.GateRegistrationTemplates[0].data[0].value = $email
Register-AuthenticationWorkflow -UserName $domainAndAccount -AuthenticationWorkflowRegistrationTemplate $userTemplate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment