I am trying to use a script to set a users AccountExpires attribute. However, I want there to be an approval sent and I am misunderstanding how the to script the approval. Here is what I have but does not send the operation to an approval.
Try{
Set-AdmUser -Identity $SAM -AccountExpirationDate $TermDate -AdaxesService localhost
$approvers = @(
"CN=spedifiedUserDN")
$managerOfRequestorIsApprover = $False
$Context.SubmitForApproval($approvers, $managerOfRequestorIsApprover, $false, $false, $false)
}