Mongo is an open-source document database. The MongoDB PowerShell Providerallows PowerShell to interact with Mongo databases as if they are drives on your system.


Once this project is installed, you simply import the Mongo module into your session:

import-module mongo

Once imported, you can create new PowerShell drives representing a Mongo database using the new-psdrive cmdlet:

new-psdrive -name db -psp mongo -root '' -connectionstring 'mongodb://server'

Once the drive is defined, you can interact with the Mongo server using standard item PowerShell cmdlets. The provider currently supports interacting with databases, collections, indexes, users, and documents using these standard item cmdlets:
  • new-item
  • get-item
  • set-item
  • remove-item
  • get-childitems

Last edited Mar 24, 2011 at 8:02 PM by beefarino, version 3