I need to run a script on a remote server, that ha

2019-08-27 05:17发布

问题:

I have a script I am writing, that I am going to do a PSSession to a remote server, then connect to sqlplus and run an unlock user command. I am not sure if this can work, because I am wanting a user prompt box to pop up, and input that variable into the alter username command in sqlplus.

This is what I have tried locally first:

sqlplus sqlusername/123;
ACCEPT myVariable CHAR PROMPT 'Inputvalue: ';
ALTER USERNAME 'Inputvalue: ' ACCOUNT UNLOCK;