Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows PowerShell中的MongoDB v3.6 runCommand命令_Mongodb_Azure_Azure Cosmosdb - Fatal编程技术网

Windows PowerShell中的MongoDB v3.6 runCommand命令

Windows PowerShell中的MongoDB v3.6 runCommand命令,mongodb,azure,azure-cosmosdb,Mongodb,Azure,Azure Cosmosdb,我正在尝试在Windows 10 powershell上运行创建分区命令,但它有一个错误: db.runCommand({customAction:“CreateCollection”,collection:“live”,shardKey:“cod_id”, 错误: “确定”:0,“errmsg”:“没有这样的命令:'customAction',错误的cmd:'{customAction:\'CreateCollection\”,集合:\'resource\,shardKey:\'custome

我正在尝试在Windows 10 powershell上运行创建分区命令,但它有一个错误:

db.runCommand({customAction:“CreateCollection”,collection:“live”,shardKey:“cod_id”,

错误:

“确定”:0,“errmsg”:“没有这样的命令:'customAction',错误的cmd:'{customAction:\'CreateCollection\”,集合:\'resource\,shardKey:\'customer\u id\”,验证器:{


有人有此错误吗?

不确定cosmosdb,但对于mongo,它将是以下命令:
db.runCommand({create:“collectionName”})