PoshMongo.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Add-MongoDBDocument</command:name> <command:verb>Add</command:verb> <command:noun>MongoDBDocument</command:noun> <maml:description> <maml:para>This cmdlet adds a document (JSON) to a MongoDB Collection.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet adds a document to the selected MongoDB Collection. You must first select the collection (Get-MongoDBCollection) before a document can be added.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Document</maml:name> <maml:description> <maml:para>This is a JSON string object. It can be a complex object that is converted to JSON via ConvertTo-Json.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to add the Document to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to add the Document to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Add-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Document</maml:name> <maml:description> <maml:para>This is a JSON string object. It can be a complex object that is converted to JSON via ConvertTo-Json.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>A Collection object to add the Document to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to add the Document to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to add the Document to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Document</maml:name> <maml:description> <maml:para>This is a JSON string object. It can be a complex object that is converted to JSON via ConvertTo-Json.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>A Collection object to add the Document to</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Text.Json</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Add-MongoDBDocument -Document '{"_id":"4e27b0f5-aaa0-4d4d-bdc8-43f811242d93","Name":"FirstName"}'</dev:code> <dev:remarks> <maml:para>An example showing how to add a simple json document to the collection</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Add-MongoDBDocument -Document $ComplexDocument |ConvertTo-Json -Compress</dev:code> <dev:remarks> <maml:para>An example showing how to add a more complex document to the collection</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Get-MongoDBCollection</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Connect-MongoDBInstance</command:name> <command:verb>Connect</command:verb> <command:noun>MongoDBInstance</command:noun> <maml:description> <maml:para>Connect to a MongoDB Instance</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Connect to a MongoDB Instance</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Connect-MongoDBInstance</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>ConnectionString</maml:name> <maml:description> <maml:para>A proper MongoDB connection string</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ForceTls12</maml:name> <maml:description> <maml:para>This switch forces the TLS 1.2 Protocol, this is required for Azure CosmosDB with a MongoDB API backend.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>ConnectionString</maml:name> <maml:description> <maml:para>A proper MongoDB connection string</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ForceTls12</maml:name> <maml:description> <maml:para>This switch forces the TLS 1.2 Protocol, this is required for Azure CosmosDB with a MongoDB API backend.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Connect-MongoDBInstance -ConnectionString $settings</dev:code> <dev:remarks> <maml:para>A simple example showing a connectionstring stored in a variable</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>MongoDB Connection String</maml:linkText> <maml:uri>https://www.mongodb.com/docs/manual/reference/connection-string/</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MongoDBCollection</command:name> <command:verb>Get</command:verb> <command:noun>MongoDBCollection</command:noun> <maml:description> <maml:para>Get a MongoDB Collection</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet returns a specific MongoDB Collection from the selected MongoDB Database, or all available collections.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>This is the database name of the database that holds the collection to return</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to retrieve from the Database</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>MongoDatabase</maml:name> <maml:description> <maml:para>This is a database object that holds the collection to return</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to retrieve from the Database</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionNamespace</maml:name> <maml:description> <maml:para>This is a string value in the following format</maml:para> <maml:para></maml:para> <maml:para>databasename.collectionname</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to retrieve from the Database</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionNamespace</maml:name> <maml:description> <maml:para>This is a string value in the following format</maml:para> <maml:para></maml:para> <maml:para>databasename.collectionname</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>This is the database name of the database that holds the collection to return</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>MongoDatabase</maml:name> <maml:description> <maml:para>This is a database object that holds the collection to return</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBCollection -CollectionName MyCollection CollectionNamespace : MyDB.MyCollection Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>How to get a collection by name</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBCollection CollectionNamespace : MyDB.MyCollection Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null CollectionNamespace : MyDB.MyCollection2 Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Get a list of collections</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBCollection -CollectionNamespace 'MyDB.MyCollection' CollectionNamespace : MyDB.MyCollection Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>How to get a collection by CollectionNamespace</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBCollection -CollectionName MyCollection -DatabaseName MyDB CollectionNamespace : MyDB.MyCollection Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>How to get a collection using CollectionName and DatabaseName</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 5 --------------------------</maml:title> <dev:code>PS C:\> $Database| Get-MongoDBCollection -CollectionName MyCollection CollectionNamespace : MyDB.MyCollection Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>How to get a collection using a databse on the pipeline</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MongoDBDatabase</command:name> <command:verb>Get</command:verb> <command:noun>MongoDBDatabase</command:noun> <maml:description> <maml:para>Get a MongoDB Database</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Get a MongoDB Database</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MongoDBDatabase</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the Database to retrieve</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the Database to retrieve</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MongoDB.Driver.MongoDatabaseBase</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBDatabase -DatabaseName MyDB Client : MongoDB.Driver.MongoClient DatabaseNamespace : MyDB Settings : GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Get a specific database from MongoDB</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBDatabase Client : MongoDB.Driver.MongoClient DatabaseNamespace : MyDB Settings : GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null Client : MongoDB.Driver.MongoClient DatabaseNamespace : MyDB2 Settings : GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Get a list of databases from MongoDB</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MongoDBDocument</command:name> <command:verb>Get</command:verb> <command:noun>MongoDBDocument</command:noun> <maml:description> <maml:para>Get a MongoDB Document</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Get a MongoDB Document from the selected Database and Collection</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DocumentId</maml:name> <maml:description> <maml:para>This is the _id of the document</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to get the Documnet from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to get the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>This is a Json string that represents the filter to be applied. See Notes</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to get the Documnet from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to get the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to get the Documnet from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to get the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>List</maml:name> <maml:description> <maml:para>A switch to list all Documents</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DocumentId</maml:name> <maml:description> <maml:para>This is the _id of the document</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>A Collection object to return Documents from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>This is a Json string that represents the filter to be applied. See Notes</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>A Collection object to return Documents from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>A Collection object to return Documents from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>List</maml:name> <maml:description> <maml:para>A switch to list all Documents</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to get the Documnet from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to get the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DocumentId</maml:name> <maml:description> <maml:para>This is the _id of the document</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>This is a Json string that represents the filter to be applied. See Notes</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>HideId</maml:name> <maml:description> <maml:para>A Switch to suppress the _id field</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>List</maml:name> <maml:description> <maml:para>A switch to list all Documents</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>A Collection object to return Documents from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Text.Json</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBDocument -DocumentId '4e27b0f5-aaa0-4d4d-bdc8-43f811242d93' _id : 4e27b0f5-aaa0-4d4d-bdc8-43f811242d93 Name : FirstName</dev:code> <dev:remarks> <maml:para>Get a specific document by the id</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBDocument -Filter '{"Name":"FirstName"}' _id : 4e27b0f5-aaa0-4d4d-bdc8-43f811242d93 Name : FirstName</dev:code> <dev:remarks> <maml:para>Get a document using a filter</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBDocument _id : 4e27b0f5-aaa0-4d4d-bdc8-43f811242d93 Name : FirstName _id : 1777c473-15fa-44f6-9509-97c3d7847cc1 Name : SecondName _id : e6a4b5cc-9a1e-46df-b240-0136afdf1e24 Name : ThirdName</dev:code> <dev:remarks> <maml:para>Get a list of available documents from the collection</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>FilterDefinitionBuilder</maml:linkText> <maml:uri>https://mongodb.github.io/mongo-csharp-driver/2.18/apidocs/html/T_MongoDB_Driver_FilterDefinitionBuilder_1.htm</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Filters</maml:linkText> <maml:uri>https://mongodb.github.io/mongo-csharp-driver/2.18/reference/driver/definitions/#filters</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Invoke-MongoDBRunCommand</command:name> <command:verb>Invoke</command:verb> <command:noun>MongoDBRunCommand</command:noun> <maml:description> <maml:para>This Cmdlet enables running commands directly against the MongoDB Instance.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This Cmdlet enables running commands directly against the MongoDB Instance. When you run a database command, you specify the command as a document to db.runCommand(). The document's key is the command to run, and the value is typically supplied as 1.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Invoke-MongoDBRunCommand</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to run the command against</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CommandString</maml:name> <maml:description> <maml:para>A string as a document the document's key is the command to run, and the value is typically supplied as 1.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Invoke-MongoDBRunCommand</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>MongoDatabase</maml:name> <maml:description> <maml:para>The Database to run the command against</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CommandString</maml:name> <maml:description> <maml:para>A string as a document the document's key is the command to run, and the value is typically supplied as 1.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CommandString</maml:name> <maml:description> <maml:para>A string as a document the document's key is the command to run, and the value is typically supplied as 1.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to run the command against</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>MongoDatabase</maml:name> <maml:description> <maml:para>The Database to run the command against</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Text.Json</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Invoke-MongoDBRunCommand -DatabaseName MyDB -CommandString '{ dbStats: 1 }' { "db": "MyDB", "collections": 1, "objects": 3, "avgObjSize": 76458, "dataSize": 229376, "storageSize": 229376, "ok": 1 }</dev:code> <dev:remarks> <maml:para>Example running the dbStats command against a single Database.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-MongoDBDatabase |ForEach-Object {$_ |Invoke-MongoDBRunCommand -CommandString '{ dbStats: 1 }'} { "db": "MyDB1", "collections": 0, "objects": 0, "avgObjSize": 0, "dataSize": 0, "storageSize": 0, "ok": 1 } { "db": "MyDB2", "collections": 4, "objects": 138, "avgObjSize": 2864, "dataSize": 395264, "storageSize": 427008, "ok": 1 } { "db": "MyDB", "collections": 1, "objects": 3, "avgObjSize": 76458, "dataSize": 229376, "storageSize": 229376, "ok": 1 }</dev:code> <dev:remarks> <maml:para>Example running the dbStats command against a single Database.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://github.com/PoshMongo/PoshMongo/blob/master/Docs/Invoke-MongoDBRunCommand.md#invoke-mongodbruncommand</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>MongoDB Commands</maml:linkText> <maml:uri>https://www.mongodb.com/docs/manual/reference/command/</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-MongoDBCollection</command:name> <command:verb>New</command:verb> <command:noun>MongoDBCollection</command:noun> <maml:description> <maml:para>Create a MongoDB Collection</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create a MongoDB Collection in the selected Database, the collection is only written back to the database when a document is added to it.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to create the collection in</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>New-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>MongoDatabase</maml:name> <maml:description> <maml:para>A database object to create the collection in</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to create the collection in</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>MongoDatabase</maml:name> <maml:description> <maml:para>A database object to create the collection in</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> New-MongoDBCollection -CollectionName MyCollection3 CollectionNamespace : MyDB.MyCollection3 Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Create a new collection</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> New-MongoDBCollection -CollectionName MyCollection4 -DatabaseName MyDB CollectionNamespace : MyDB.MyCollection4 Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Create a new collection in a different database</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> $Database| New-MongoDBCollection -CollectionName MyCollection5 CollectionNamespace : MyDB.MyCollection5 Database : MongoDB.Driver.MongoDatabaseImpl DocumentSerializer : MongoDB.Bson.Serialization.Serializers.BsonDocumentSerializer Indexes : MongoDB.Driver.MongoCollectionImpl`1+MongoIndexManager[MongoDB.Bson.BsonDocument] Settings : AssignIdOnInsert=True;GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Create a new collection in the database on the pipeline</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-MongoDBDatabase</command:name> <command:verb>New</command:verb> <command:noun>MongoDBDatabase</command:noun> <maml:description> <maml:para>Create a MongoDB Database</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create a MongoDB Database, the database is only written to Mongo when a collection is stored in it.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-MongoDBDatabase</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to create</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> New-MongoDBDatabase -DatabaseName MyDB3 Client : MongoDB.Driver.MongoClient DatabaseNamespace : MyDB3 Settings : GuidRepresentation=CSharpLegacy;ReadConcern={ };ReadEncoding=null;ReadPreference={ Mode : Primary };WriteConcern={ };WriteEncoding=null</dev:code> <dev:remarks> <maml:para>Create a new database</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Remove-MongoDBCollection</command:name> <command:verb>Remove</command:verb> <command:noun>MongoDBCollection</command:noun> <maml:description> <maml:para>Remove a MongoDB Collection</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Remove a MongoDB Collection from the selected database</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Collection</maml:name> <maml:description> <maml:para>A collection object to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBCollection</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to remove the collection from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Collection</maml:name> <maml:description> <maml:para>A collection object to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the collection to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to remove the collection from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>null</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Remove-MongoDBCollection -CollectionName MyCollection</dev:code> <dev:remarks> <maml:para>Remove a collection from the database</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Remove-MongoDBCollection -CollectionName MyCollection -DatabaseName MyDB</dev:code> <dev:remarks> <maml:para>Remove a collection from the database specified</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS C:\> $Collection| Remove-MongoDBCollection</dev:code> <dev:remarks> <maml:para>Remove a collection on the pipeline</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Remove-MongoDBDatabase</command:name> <command:verb>Remove</command:verb> <command:noun>MongoDBDatabase</command:noun> <maml:description> <maml:para>Remove a MongoDB Database</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Remove a MongoDB Database</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-MongoDBDatabase</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Database</maml:name> <maml:description> <maml:para>The MongoDatabase to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBDatabase</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Client</maml:name> <maml:description> <maml:para>The MongoClient to use for a connection</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoClient</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoClient</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Database</maml:name> <maml:description> <maml:para>The MongoDatabase to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoDatabase</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoDatabase</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the database to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>null</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Remove-MongoDBDatabase -DatabaseName MyDB3</dev:code> <dev:remarks> <maml:para>Remove a database from Mongo</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Remove-MongoDBDocument</command:name> <command:verb>Remove</command:verb> <command:noun>MongoDBDocument</command:noun> <maml:description> <maml:para>Remove a MongoDB Document</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Remove a MongoDB Document from the selected collection</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DocumentId</maml:name> <maml:description> <maml:para>The Id of the Document to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the Collection to remove a Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>This is a hashtable of values that are converted into a simple equality type filter. For example:</maml:para> <maml:para>@{'Name'='FirstName'}</maml:para> <maml:para>Is translated into a FilterDefinition object</maml:para> <maml:para>Filter.Eq(key, value));</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue> <dev:type> <maml:name>System.Collections.Hashtable</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the Collection to remove a Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Document</maml:name> <maml:description> <maml:para>The Document to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the Collection to remove a Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Document</maml:name> <maml:description> <maml:para>The Document to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>The Collection object to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DocumentId</maml:name> <maml:description> <maml:para>The Id of the Document to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>The Collection object to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-MongoDBDocument</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>This is a hashtable of values that are converted into a simple equality type filter. For example:</maml:para> <maml:para>@{'Name'='FirstName'}</maml:para> <maml:para>Is translated into a FilterDefinition object</maml:para> <maml:para>Filter.Eq(key, value));</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue> <dev:type> <maml:name>System.Collections.Hashtable</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>The Collection object to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>CollectionName</maml:name> <maml:description> <maml:para>The name of the Collection to remove a Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the MongoDBDatabase to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Document</maml:name> <maml:description> <maml:para>The Document to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>DocumentId</maml:name> <maml:description> <maml:para>The Id of the Document to remove</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>This is a hashtable of values that are converted into a simple equality type filter. For example:</maml:para> <maml:para>@{'Name'='FirstName'}</maml:para> <maml:para>Is translated into a FilterDefinition object</maml:para> <maml:para>Filter.Eq(key, value));</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Collections.Hashtable</command:parameterValue> <dev:type> <maml:name>System.Collections.Hashtable</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>MongoCollection</maml:name> <maml:description> <maml:para>The Collection object to remove the Document from</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</command:parameterValue> <dev:type> <maml:name>MongoDB.Driver.IMongoCollection`1[MongoDB.Bson.BsonDocument]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Text.Json</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Remove-MongoDBDocument -DocumentId '4e27b0f5-aaa0-4d4d-bdc8-43f811242d93'</dev:code> <dev:remarks> <maml:para>Remove a document from the collection</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Remove-MongoDBDocument -Filter @{'Name'='FirstName'}</dev:code> <dev:remarks> <maml:para>Remove a document from the collection using a filter</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> </helpItems> |