vikram athare
vikram athare

Reputation: 55

-confirm not working

I'm trying to run

Set-SPManagedAccount -Identity $SPUser -ExistingPassword $nPassword -Confirm

But it is asking me to confirm again. I tried couple of other method by changing $confirmpreference, but it didn't help. I am not sure why it is asking for confirmation. How do I stop it asking for confirmation?

Upvotes: 1

Views: 499

Answers (1)

Mathias R. Jessen
Mathias R. Jessen

Reputation: 174425

You need to explicitly set the value of Confirm to $false to avoid being prompted:

Set-SPManagedAccount -Identity $SPUser -ExistingPassword $nPassword -Confirm:$false

Upvotes: 2

Related Questions