Auto answer to multiple question

Hello,
I’m trying to write a powershell script to enable authentication on a Crestron processor (with plink command).
When I activate authentication, the system asks me to enter the administrator username, then the password and finally enter the password again to confirm.
Of course, I would like the script to do this automatically.
I got there in batch but I can’t do the same in Powershell.
Here is the batch version:

(
timeout 2 > nul
echo username
timeout 3 > nul
echo password
timeout 3 > nul
echo password
) | plink -ssh -v -batch -l oldUsername -pw oldpassword %Processor_IP% “auth on”

Could you help me,
Thanks

For those who prefer, the batch command can also be written as a line :

(echo username & timeout 3 > nul & echo password & timeout 3 > nul & echo password & timeout 3 > nul) | plink -ssh -v -batch -l oldusername -pw oldpassword %Processor_IP% “auth on”