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 7 nTSecurityDescriptor missing properties #143

Closed
mrhousz opened this issue Jul 25, 2024 · 5 comments
Closed

PowerShell 7 nTSecurityDescriptor missing properties #143

mrhousz opened this issue Jul 25, 2024 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@mrhousz
Copy link

mrhousz commented Jul 25, 2024

Environment:
Locksmith 2024.3, installed from PSGallery using Install-Module Locksmith
Windows 10 Enterprise 22H2, July 2024 security updates
PowerShell 7.4.4

Issue:

Running Invoke-Locksmith in PowerShell 7 returns errors:

A constructor was not found. Cannot find an appropriate constructor for type System.Security.Principal.NTAccount.

This is due to missing object properties in the nTSecurityDescriptor object collected by Get-ADCSObject function.

image

Potential fix/workaround:

PowerShell/PowerShell#21540 (comment)

Import-Module Microsoft.PowerShell.Security prior to running Invoke-Locksmith results in the objects collected by Get-ADCSObject having the needed nTSecurityDescriptor properties

image

@SamErde
Copy link
Collaborator

SamErde commented Jul 26, 2024

Good find. We should be able to test that and add to the module manifest so you don't need to manually import it.

@TrimarcJake
Copy link
Owner

Agreed. Should be way fix. @SamErde you wanna handle or me?

@SamErde
Copy link
Collaborator

SamErde commented Jul 26, 2024 via email

@TrimarcJake TrimarcJake added the bug Something isn't working label Jul 26, 2024
@TrimarcJake
Copy link
Owner

Thank you, friend.

@mrhousz
Copy link
Author

mrhousz commented Jul 26, 2024

Thank you for this module and glad I could help. This was my first Github issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants