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

AggregateExceptions are hiding the real error in PowerShell output #21

Open
AaronGenter opened this issue Jul 31, 2019 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@AaronGenter
Copy link

When I try to use Powershell to add a custom BannedWord or CompromisedPassword, I get the following error:

PS C:\Windows\system32> Add-BannedWord -Value "glass"
Add-BannedWord : One or more errors occurred.
At line:1 char:1

  • Add-BannedWord -Value "glass"
  •   + CategoryInfo          : NotSpecified: (:) [Add-BannedWord], AggregateException
      + FullyQualifiedErrorId : System.AggregateException,Lithnet.ActiveDirectory.PasswordProtection.PowerShell.AddBannedWord
    
    

PS C:\Windows\system32> Add-CompromisedPassword -Value "glass"
Add-CompromisedPassword : One or more errors occurred.
At line:1 char:1

  • Add-CompromisedPassword -Value "glass"
  •   + CategoryInfo          : NotSpecified: (:) [Add-CompromisedPassword], AggregateException
      + FullyQualifiedErrorId : System.AggregateException,Lithnet.ActiveDirectory.PasswordProtection.PowerShell.AddCompromisedPassword
    
    

Thank you!

@AaronGenter
Copy link
Author

It appears the command doesn't use the default store, as mentioned in the Open-Store Wiki, and you have to run Open-Store first.

@ryannewington
Copy link
Member

Hi Aaron,

Can you send me the result of running the following command immediately after getting that error.

$error[0].Exception.ToString()

@AaronGenter
Copy link
Author

Looks like it's my bad... When I do open-store I went right to the file system location and didn't use the share. The share was setup as read-only. Thank you for the command to show the error message: System.AggregateException: One or more errors occurred. ---> System.UnauthorizedAccessException: Access to the path '\servername\lpp$\v3\w\AE2C.db.bin' is denied.

Sorry for the bogus issue! After fixing the share permissions, it is working as expected.

@ryannewington
Copy link
Member

That's ok. I'll need to fix the error reporting to make it more clear what was going on.

@ryannewington ryannewington changed the title Add / Import BannedWord or CompromisedPassword AggregateExceptions are hiding the real error in PowerShell output Oct 27, 2019
@ryannewington ryannewington self-assigned this Oct 27, 2019
@ryannewington ryannewington added the bug Something isn't working label Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants