crkmanju
We are looking for connect to mongodb with encryption settings. Is ppwershell cmdlets supports the same.
#88 · closed · 5 comments
We are looking for connect to mongodb with encryption settings. Is ppwershell cmdlets supports the same.
How do you connect form other clients? Can you use the same connection string and see if it works?
Referring to https://www.mongodb.com/docs/manual/core/csfle/fundamentals/automatic-encryption/#std-label-csfle-fundamentals-automatic-encryption Autoencrytionoptions for client settings is what I was looking for
I see, thank you. Then it is supported as much as the used C# driver supports it. See ``` > get-help Connect-Mdbc # use this Connect-Mdbc [[-Settings] <MongoClientSettings>] [[-DatabaseName] <String>] [[-CollectionName] <String>] [-ClientVariable <String>] [-CollectionVariable <String>] [-DatabaseVariable <String>] [-NewCollection] [<CommonParameters>] ``` You should manually create `MongoClientSettings` and pass it in `Connect-Mdbc`. This is more like C# coding but PowerShell lets you do this, mostly. Please refer to the MongoDB C# driver docs for the details. I can see that `MongoClientSettings` has the property `public AutoEncryptionOptions AutoEncryptionOptions`. I believe it looks like what you are looking for.
I have also just updated the C# driver to the latest 2.30, just in case. https://www.powershellgallery.com/packages/Mdbc/6.7.4
Thank you will look into it