I would like to access a couchbase server from PowerShell 5.1 in order to retrieve and provide json documents (typical CRUD operation with small, yet numerous json objects) couchbase REST API is meant for administrative access, so according to the couchbase recommendation (REST API reference | Couchbase Docs ) I consider to use .net API assemblies to provide this functionality.
However I seem to lack some basic understanding here. Google search did not point to tutorial material … Getting the package is ok, add-type gives dependency errors though. Is there a place I could use to get more information? Relevant experiences anyone?
I’ve never heard of anyone trying this before. It should be theoretically doable, but as you’ve seen dependency management is the issue.
When you install a NuGet package in a C# project, it’s pulling a lot of dependencies in, including transitive dependencies up the tree. I believe you’ll need to manually handle this in PowerShell, using Add-Type to add all dependencies. You can look at the dependencies on NuGet.org, if you’re using PowerShell 5.1 it will be the .NET Standard 2.0 dependencies you need. But you’ll also have to check those dependencies for dependencies, so on and so forth up the tree.
Not exactly what you are asking for, but along a similar vein is Couchbase Shell. You might want to take a look at it as it does what your asking just not in PS.