I have this following query working on mongo shell as expected.
db.getCollection(\'personnels\').update( { _id: ObjectId(\"55f6728b9d73a15807885d
I'm not sure, but you can try using this:
var update = Builders.Update.PullFilter( "Devices.$.DeviceCloudFolders", Builders.Filter.Eq("CloudFolderId", _cloudFolderId));