PowerShell Wait to execute next command on enter or char response "Y"

I use batch file to do installs .  How do I tell PowerShell wait until user response enter  key or Y.

I am not that picky about which way this is done. I just like simple coding solutions.

in a batch file I use this command

timeout /t -1