Skip to content

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

Closed

Description

@endersdestiny

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

Activity

  1. lzybkr commented on Jun 4, 2018

    @lzybkr
    Contributor

    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.

  2. Protesthb commented on Jul 23, 2018

    @Protesthb

    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

  3. daxian-dbw commented on Feb 22, 2021

    @daxian-dbw
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions