Questions tagged [runcommand]

53 questions
29
votes
6 answers

Visual Studio Help - The "RunCommand" property is not defined

I'm using Microsoft Visual Studio Community 2017. I have created a project with multiple classes. The primary class I want the application to run first has public static void Main(string[] args) in it. I've set properties to the following: Target…
Cole Connelly
  • 333
  • 1
  • 3
  • 7
6
votes
0 answers

not able to run aws ssm run-command as different user other than root

I want to sync a s3 bucket on ec2 instance and I want to do it using ssm run-command. The problem is ssm run-command always executes as root user which does not have s3 permissions. how to run ssm run-commands as ubuntu user.
rahulk9
  • 795
  • 3
  • 10
  • 20
5
votes
1 answer

runCommand vs aggregate method to do aggregation

To run aggregation query it is possible to use either of these: db.collectionName.aggregate(query1); OR db.runCommand(query2) But I noticed something bizarre this morning. While this: db.runCommand( { "aggregate":"collectionName", …
dsharew
  • 10,377
  • 6
  • 49
  • 75
5
votes
1 answer

MongoDB's runCommand is much slower than direct call

I have this two mongo commands, that in my opinion should lead to the same results: for(var i=0;i<1000;i++){db.test.insert({a:1}); db.getLastError({j:1, w:1});}; for(var i=0;i<1000;i++){db.test.insert({a:1}); db.runCommand({getLastError:1, j:1,…
Tomas Kulich
  • 14,388
  • 4
  • 30
  • 35
4
votes
1 answer

Mongodb Admin cannot runCommand in another database (error code 13)

I've got some rights issues with mongoDB, I created a DB admin using the auth menthod, and this worked. I can connect from a distant server to my DB without any warning, using the admin account I created with the role "userAdminAnyDatabase". But,…
Vodsky
  • 41
  • 4
3
votes
4 answers

azure run command script to mount file storage

I have created VM which needs to download some files from Azure File Storage. I am looking for a way to automate this and I am trying the Azure VM Run command Script. The first step CmdKey is all working fine but the next step which is: net use Z:…
3
votes
1 answer

The node.js native mongodb driver returns an "not master" error when it run db.command({aggregate : ...})

It's different that the result of mongoShell and node.js application. My mongodb environment uses shard cluster. The result of mongoShell mongos> db.runCommand({aggregate : "collection", pipeline : my_pipeline(), allowDiskUse : true}); { …
2
votes
1 answer

Azure run command for Fortinet virtual machine with serial console?

I'm trying to execute with Azure a .conf file that has some command lines that are executable into the Fortinet's serial console in a virtual machine with FortiOS v6.4.3 (Linux based system). I use AZ CLI to execute the script into the virtual…
Elias Arellano
  • 433
  • 5
  • 16
2
votes
0 answers

AWS Systems Manager Run Command execution timeout when I use nohup &

AWS Systems Manager Run Command when I use command nohup & it returns execution timeout Does AWS Systems Manager Run command not supports background process? How to fix this problem?
ParkEunsoo
  • 21
  • 1
2
votes
0 answers

How to remove EC2 instance from load balancer (ELB) with AWS Systems Manager Maintenance Windows

I have EC2 instances behind an ELB. In Systems Manger, I want a way to automate taking an instance off the load balancer, then run command AWS-ApplyPatchBaseline, then putting the instance back on the load balancer. I have successfully used…
2
votes
3 answers

Using the 'az vm run-command' with a .ps1 file

I have an issue with the az vm run-command. I have got it working inline as follows: $resource_name="winsecagentdev2" $resource_group="russellmccloydev" and: az vm run-command invoke ` -g "${resource_group}" ` -n "${resource_name}" ` --command-id…
RuSs
  • 1,725
  • 1
  • 29
  • 47
2
votes
1 answer

How to halt a script launched with 'run' in Matlab / GNU Octave?

Is there any way to stop a script launched with 'run' or 'source' from Matlab / GNU Octave? I mean different from Ctrl-C, say that a given condition (perhaps given by global variables) holds and a break signal is sent to it. Example: The script…
nightcod3r
  • 752
  • 1
  • 7
  • 26
1
vote
1 answer

Create role for mongo

In Go, I am adding a user to mongo and want to create a role, which grants access only to a specific collection. I am new to mongo, so not sure exactly how to do this. My attempt is to use the RunCommand. Below is what I tried, but I am getting…
Hyggelik
  • 13
  • 3
1
vote
1 answer

(Execution Timeout) Boto3 register_task_with_maintenance_window

I am currently using an AWS Lambda to initiate a maintenance window, but have found that the Execution Timeout is default set to 3600 (1hour), when this is used on a larger scale 1 hour tends to drag on a bit. I am attempted to lower the timeout to…
Gary A
  • 13
  • 3
1
vote
1 answer

Get StdOut from RunCommand using Azure VM Javascript SDK

I'm using the Azure VM Javascript SDK in my Node.js webApp. I'm trying to use the RunCommand Function to run a custom script on my Azure virtual machines. The problem I'm having is with obtaining the response from running the command which should…
Stanton
  • 904
  • 10
  • 25
1
2 3 4