Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell error from Edge on Win 10 connecting to Server 2016 #697

Closed
endersdestiny opened this issue Jun 1, 2018 · 3 comments
Closed

Comments

@endersdestiny
Copy link

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 0 Keys:

Exception:
System.UnauthorizedAccessException: Access to the path 'PSReadlineHistoryFile_46696421' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Environment data

Steps to reproduce or exception report

@lzybkr
Copy link
Member

lzybkr commented Jun 4, 2018

Do you have more information on how to reproduce the problem?

Without additional details, the best I can probably do is just suppress the error and not use the history file.

@Protesthb
Copy link

Hi lzybkr,

I have the same Problem.
I when I try to use the PowerShell function in Windows Admin Center.

The Setup witch is not working:
The Windows Admin Center is installed at a Server 2016 (Name: Server1).
Admin1 = not Admin at Server1 but have Client Admin Rights at Client1 and Client2
Admin2 = Admin at Server1 and have Client Admin Rights at Client1 and Client2

Admin1 is using the Admin Center via Web (Server1) on the Client1 and want to Administrate Client2.
Every function is working correct just the PowerShell function is not working with the upper error message.
Admin2 is using the Admin Center via Web on the Client1 and want to Administrate Client2.
Every function is working correct also the PowerShell function.

The Setup witch is working:
The Windows Admin Center is installed at Client1.
Admin1 = not Admin at Server1 but have Client Admin Rights at Client1 and Client2
Admin2 = Admin at Server1 and have Client Admin Rights at Client1 and Client2

Admin1 is using the Admin Center via Web (localhost) on the Client1 and want to Administrate Client2.
Every function is working correct also the PowerShell function.
Admin2 is using the Admin Center via Web on the Client1 and want to Administrate Client2.
Every function is working correct also the PowerShell function.

Regards,
Protesthb

@daxian-dbw
Copy link
Member

#1061 and #1602 were made to improve how PSReadLine uses mutex for history file. Also, it's been a long time that I don't see new issues reporting about UnauthorizedAccessException regarding the mutex. So I think the issue was resolved. Please upgrade to the 2.1.0 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants