We help IT Professionals succeed at work.

Powershell, Json and MongoDB

Medium Priority
167 Views
Last Modified: 2019-08-27
Hi,

Please see https://www.experts-exchange.com/questions/29154913/Powershell-and-jsons-to-a-Mongodb-PS-management-mongodb-itemd.html

I would like to have a jumpstart on PowerShell, MongoDB and jsons I have.

So I import the Powershell module, have my MongoDB, then please help me with a basic script.
$MyMongoDBServer
Connect-To $MyMongoDBServer
Then what? Create a database or just import the jsons in bulk, foreach path get-content path convert to json then import?
Then how do I read it via Powershell

Dont have any mongodb knowledge, Powershell I do know pretty well.
Could you show me a working example script of how it is done?

J

J
Comment
Watch Question

Multitechnician
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
you've everything step 4, what miss ?
https://github.com/nightroman/Mdbc

the main thing about MongoDB is it's a non relational db
https://www.mongodb.com/scale/what-is-a-non-relational-database
the second point :

** Data structure: ** Non-relational databases are designed to handle unstructured data that doesn’t fit neatly into rows and columns. This matters as most of the data generated today is unstructured.

just add "records" in a table, no mater how much element you're inserting