0

Having issue with one arg in my minecraft server powershell script

line reads as follows Exception calling "ReadKey" with "1" argument(s): "The method or operation is not implemented." At F:\BMC2_FABRIC_1.20.1_Server_Pack_v24\start.ps1:102 char:6

Line 102 char 6 is as follows $Host.ui.RawUI.ReadKey("NoEcho,IncludeKeyDown") > $null

I tried removing the periods in the line and shifting the first character around one or two spaces, to no avail.

2
  • 1
    $Host.ui.RawUI.ReadKey is not implemented in powershell ISE. Use powershell.exe instead and it shouldnt fail in that line. Commented Jan 15, 2024 at 20:15
  • 1
    As an aside: The PowerShell ISE is no longer actively developed and there are reasons not to use it (bottom section), notably not being able to run PowerShell (Core) 7+. The actively developed, cross-platform editor that offers the best PowerShell development experience is Visual Studio Code with its PowerShell extension. Commented Jan 15, 2024 at 21:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.