I am running linux commands from powershell. Made a connection from powershell to linux vm. it is working properly but when I use sudo command ( for ex . sudo useradd test) , it gives below error "sudo: sorry, you must have a tty to run sudo bash: could: command not found" .
I need to use sudo because I am not executing the script as 'root'. I need to execute this as a user.