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

New-MdbcData : Object reference not set to an instance of an object #19

Closed
rmoreas opened this issue Apr 2, 2018 · 5 comments
Closed

Comments

@rmoreas
Copy link

rmoreas commented Apr 2, 2018

When using the -Id parameter with New-MdbcData or Add-MdbcData, I'll get following error (using example from New-MdbcData):

Get-Process mongod | New-MdbcData -Id {$_.Id} -Property Name, WorkingSet, StartTime
New-MdbcData : Object reference not set to an instance of an object.
At line:1 char:22
+ ... ss mongod | New-MdbcData -Id {$_.Id} -Property Name, WorkingSet, Star ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-MdbcData], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Mdbc.Commands.NewDataCommand
@nightroman
Copy link
Owner

Thank you for the report. Hmm, it works on the first call and fails on the second. I will take a look.

@nightroman
Copy link
Owner

Fixed in v5.1.1
Thanks again.

@rmoreas
Copy link
Author

rmoreas commented Apr 2, 2018

Thanks for quick response. I currently work around the issue like this:

Get-Process mongod | %{ New-MdbcData -InputObject $_ -Id $_.Id -Property Name, WorkingSet, StartTime }

@rmoreas
Copy link
Author

rmoreas commented Apr 2, 2018

How long does it take to get the PSGallery updated with new version?

@nightroman
Copy link
Owner

Oh, pushed to NuGet and forgot about PSGallery. Done.

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