Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.

Mohammed, Mohd Faizal 0 Reputation points
2025-03-25T06:31:29.8566667+00:00

Hi, I‘m getting the following error while executing the "Invoke-WebRequest" command over "ssh.exec()":

Win32 internal error "Access is denied." 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.

.NET Training
.NET Training
.NET: Microsoft Technologies based on the .NET software framework.Training: Instruction to develop new skills.
28 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pradeep M 8,185 Reputation points Microsoft External Staff
    2025-03-25T12:25:48.12+00:00

    Hi Mohammed, Mohd Faizal,

    Thank you for reaching out to Microsoft Q & A forum.   

    It looks like you’re encountering a permission issue when running Invoke-WebRequest over ssh.exec() on Windows 11. Since this works on Windows 10, the problem is likely due to Windows 11’s stricter security settings. 

    1.Run PowerShell as Administrator and try again. 

    2.Modify the execution policy by running: 

    Set-ExecutionPolicy RemoteSigned -Scope Process -Force
    
    

    3.Use Start-Process with elevated privileges: 

    Start-Process powershell.exe -ArgumentList "-Command Invoke-WebRequest -Uri '$DOTNET_INSTALL_SCRIPT_URL' -OutFile '$working_dir\..\dotnet-install.ps1'" -Verb RunAs
    
    

     4.Check Windows Defender or antivirus settings, as they might be blocking the script. 

    5.Verify Group Policy restrictions if this is a company-managed device, as they may limit remote script execution. 

    If the issue persists, check Event Viewer logs or try manually downloading the script outside of SSH.     

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.  

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.