-
-
Save mattwoolnough/45592082354d7db6b2758a3152b0b0db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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