<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:27 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-1712] accessing mongodb v3.x with powershell</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1712</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I had a powershell script that was accessing mongodb v2.x and after the upgrade to mongodb 3.x the script is failing to connect to the database, the error is that credentials are wrong.  I have upgraded to the latest version of the csharp mongo driver, but still can not connect to the db.  I am looking for the specific driver and connection string for powershell to connect to mongodb v3.&lt;/p&gt;</description>
                <environment>mongodb v3 running on redhat, powershell 4.0 running on windows 2012 R2</environment>
        <key id="301788">CSHARP-1712</key>
            <summary>accessing mongodb v3.x with powershell</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="rjurek">Ross Jurek</reporter>
                        <labels>
                            <label>mongodb</label>
                            <label>powershell</label>
                            <label>question</label>
                    </labels>
                <created>Mon, 18 Jul 2016 11:45:03 +0000</created>
                <updated>Fri, 5 Apr 2019 13:58:54 +0000</updated>
                            <resolved>Mon, 18 Jul 2016 16:54:34 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1327289" author="rjurek" created="Mon, 18 Jul 2016 17:46:44 +0000"  >&lt;ul&gt;
	&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt;
		&lt;ul&gt;
			&lt;li&gt;
			&lt;ul&gt;
				&lt;li&gt;
				&lt;ul&gt;
					&lt;li&gt;driver 1.7 from 10gen, mongo 2.6 - This code gives a credential error when changing to the 3.2.1 mongodb use old driver, changed to new driver, error that create method does not exist.&lt;br/&gt;
$mongoDbDriverPath = &quot;C:\utilities\mongoDB_1\&quot;&lt;br/&gt;
$dbName = &quot;Prod&quot;&lt;br/&gt;
$collectionName = &quot;Collect&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Driver.dll&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Driver.Core.dll&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Bson.dll&quot;&lt;br/&gt;
$db = &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.MongoDatabase&amp;#93;&lt;/span&gt;::Create(&quot;mongodb://user:password@server/$($dbname)&quot;)&lt;br/&gt;
$collection = $db&lt;span class=&quot;error&quot;&gt;&amp;#91;$collectionName&amp;#93;&lt;/span&gt;&lt;br/&gt;
$query = &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.Builders.Query&amp;#93;&lt;/span&gt;::AND(&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.Builders.Query&amp;#93;&lt;/span&gt;::EQ(&quot;Result&quot;,&quot;Response status code does not indicate success: 403 (Forbidden).&quot;),&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.Builders.Query&amp;#93;&lt;/span&gt;::EQ(&quot;ItemName&quot;,&quot;Automatic but Stopped Services&quot;))&lt;br/&gt;
$results = $collection.find($query)&lt;/li&gt;
				&lt;/ul&gt;
				&lt;/li&gt;
			&lt;/ul&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt;
		&lt;ul&gt;
			&lt;li&gt;
			&lt;ul&gt;
				&lt;li&gt;
				&lt;ul&gt;
					&lt;li&gt;2.6 csharpdriver, mongodb 3.2.1 - get Cannot find an overload for &quot;GetCollection&quot; and the argument count: &quot;1&quot;.&lt;/li&gt;
				&lt;/ul&gt;
				&lt;/li&gt;
			&lt;/ul&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;$mongoDbDriverPath = &quot;C:\utilities\mongoDB_2\&quot;&lt;br/&gt;
$dbName = &quot;Prod&quot;&lt;br/&gt;
$collectionName = &quot;Collect&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Driver.dll&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Driver.Core.dll&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Bson.dll&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Driver.GridFS.dll&quot;&lt;br/&gt;
Add-Type -Path &quot;$($mongoDbDriverPath)\MongoDB.Driver.Legacy.dll&quot;&lt;br/&gt;
$client = New-Object -TypeName MongoDB.Driver.MongoClient -ArgumentList &quot;mongodb://user:password@server&quot;&lt;/p&gt;

&lt;p&gt;$database = $client.GetDatabase($dbName)&lt;br/&gt;
$collection = $database.GetCollection(&apos;collect&apos;)&lt;/p&gt;

&lt;p&gt;$query = &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.Builders.Query&amp;#93;&lt;/span&gt;::AND(&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.Builders.Query&amp;#93;&lt;/span&gt;::EQ(&quot;Result&quot;,&quot;Response status code does not indicate success: 403 (Forbidden).&quot;),&lt;br/&gt;
            &lt;span class=&quot;error&quot;&gt;&amp;#91;MongoDB.Driver.Builders.Query&amp;#93;&lt;/span&gt;::EQ(&quot;ItemName&quot;,&quot;KO - Automatic but Stopped Services&quot;))&lt;/p&gt;

&lt;p&gt;$results = $collection.find($query)&lt;/p&gt;</comment>
                            <comment id="1326739" author="emily.stolfo@10gen.com" created="Mon, 18 Jul 2016 11:57:34 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rjurek&quot; class=&quot;user-hover&quot; rel=&quot;rjurek&quot;&gt;rjurek&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you don&apos;t mind that I moved your question to the CSHARP project. You originally created the ticket in the MONGOID project, which seems like it was a mistake, as Mongoid is the Ruby ODM.&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Emily&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="301790">CSHARP-1713</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsno8v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>