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

Getting an exception while running this. #4

Open
sonalis04 opened this issue Nov 13, 2020 · 6 comments
Open

Getting an exception while running this. #4

sonalis04 opened this issue Nov 13, 2020 · 6 comments

Comments

@sonalis04
Copy link

Exception calling "AddRange" with "1" argument(s): "Collection cannot be null.
Parameter name: c"
At line:85 char:1

  • $allKeyVaultObjects.AddRange((Get-AzureKeyVaultObjectKeys -VaultName ...
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : ArgumentNullException
    
@rahulpnath
Copy link
Owner

Sorry, Can you give more details on what you are trying to run? this repository has all my blog samples so can't tell which one this is relating to.

@sonalis04
Copy link
Author

Sorry Rahul! My bad - I was trying to run the KeyVault Expiry Alerter.

https://github.com/rahulpnath/Blog/blob/master/KeyVaultExpiryAlerter/Expiry%20Alert.ps1

@rahulpnath
Copy link
Owner

No worries - It's been a long time since I have written this. are there any keys in the key vault that you are connecting to? Looks like that might be an issue and something that needs to be handled there?

@sonalis04
Copy link
Author

Oh, possible - I would take a look to that Rahul. Would you know if I can do it for all KeyVaults within a sub, I tried specifying multiple keyvaults within the keyvault, but that didn't work.

@rahulpnath
Copy link
Owner

The current script is for one vault - You will need to modify it to loop through multiple if you want.
Let me know if you are able to solve the issue. In case you run into any fixes for the script, would be great if you can raise a PR 😀

@rahulpnath
Copy link
Owner

@sonalis04 Did you have any luck with this?

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

2 participants