Cmdlets for MongoDB

Build 24.0.9060

QueryPassthrough Parameter (Connect-MongoDB Cmdlet)

This option passes the query to MongoDB as-is.

Syntax

Connect-MongoDB -QueryPassthrough SwitchParameter

Data Type

bool

Default Value

false

Remarks

When set to 'True', the specified query will be passed to MongoDB as-is. Currently only these shell commands are supported:

  • db.myCollection.find() returns all fields for all records in the collection.
  • db.myCollection.find({ query }) returns all fields for all records in the collection matching the query.
  • db.myCollection.find({ query }, { projection }) returns the fields in the projection, for all records matching the query.
  • All of the above forms accept a .json() suffix. This returns a single column containing the matching documents as JSON instead of individual fields.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060