A PowerShell module providing cmdlets for MongoDB operations using the official C# driver.
Mdbc is a PowerShell module that provides cmdlets for interacting with MongoDB databases. It allows users to perform common database operations such as connecting to MongoDB, querying documents, inserting data, updating records, and managing collections directly from PowerShell. The module is built on top of the official MongoDB C# driver, ensuring compatibility and reliability.
PowerShell users, system administrators, and developers who need to automate MongoDB tasks or integrate MongoDB operations into their PowerShell scripts and workflows.
Mdbc offers a seamless, PowerShell-native interface to MongoDB, eliminating the need for external tools or complex C# code. Its cmdlet-based design integrates with PowerShell pipelines and provides tab completion for database and collection names, making it efficient for both interactive use and automation.
MongoDB Cmdlets for PowerShell
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Cmdlets like Add-MdbcData and Get-MdbcData integrate with PowerShell pipelines, allowing document insertion and retrieval through familiar piping, as shown in the quick start examples.
Built on the MongoDB C# driver, ensuring reliable support for MongoDB protocols and features, with updates aligned with the official driver releases.
The module maps all key MongoDB driver methods to cmdlets, including transactions with Use-MdbcTransaction and change streams with Watch-MdbcChange, as detailed in the command table.
Available on the PowerShell Gallery with high download counts (indicated by badges), making installation straightforward via Install-Module Mdbc and showing active usage.
Requires PowerShell Core 7.4 specifically, limiting compatibility with older versions or environments where upgrading is not feasible.
Argument completers for database and collection names are not included by default; they require a separate script installation (Mdbc.ArgumentCompleters), adding complexity to the setup.
As a PowerShell wrapper over the C# driver, it may introduce overhead for large-scale operations compared to direct driver usage in compiled .NET applications.
Tied to the PowerShell ecosystem, making it less useful for teams relying on other tools or languages, such as bash scripts or GUI-based MongoDB clients.