Skip to content

Grant-CPermission fails with 'Resolve-CIdentity Identity [Domain]\[User] notfound' for one user #130

@Andrioden

Description

@Andrioden

We are developing a powershell script for our employes, which among many things installs some certificates on their computer. One user got an error.

Further debugging leads me to belive that it is Resolve-CIdentityName -Name $Identity that is the problem

Command

$certPath = ...
$identity = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
Grant-CPermission -Identity $identity -Permission "ReadData" -Path $certPath

image

More images from testing on the failing users computer
image
image
image

Environment

  • Windows 11
  • Surface Pro
  • PSVersion 5.1.22621.963

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