title: Restart the currently running script?
body: <p>Alrighty, so I've got this much down. </p>
  
  <pre><code># Prompts the script user to confirm that the account from
  # $userName is indeed the one they want to Terminate
  function Get-Confirmation {
      [CmdletBinding(SupportsShouldProcess=$true)]
      param (
          [Parameter(Mandatory=$true)]
          [String]
          $userName
      )
  
      $confirmMessage = 'Are you sure that {0} is the user that you want to terminate?' -f $userName
  
      $PSCmdlet.ShouldContinue($confirmMessage, 'Terminate User?')
  }
  
  # Code that populates $userName and starts the Termination process
  if (Get-Confirmation -User $userName) {
      # If  confirmation == True: start Termination
  
      # Copy user's security groups to $groups.txt in their user folder
      Out-File $logFilePath -InputObject $userNameGroups.memberOf -Encoding utf8
  
      # TODO: Remove $userName's security groups from AD Object
      # Remove-ADGroupMember -Identity $_ -Members $userNameGroups -Confirm:$false
  
      Copy-Item -Path "\\path\to\active\user\folder" ` 
          -Destination "\\path\to\terminated\user\folder"
  } else {
      # Don't Terminate
      # TODO: Restart script to select another user
  }
  </code></pre>
  
  <p>So my question is: how do I satisfy the TODO in the <code>else</code> statement? I've searched online, but the only thing that has come up is restarting the computer. I just want the script to be re-run. Is it as simple as <code>./scriptName</code>?</p>