Questions tagged [runcommand]

53 questions
0
votes
1 answer

AWS SSM Command Document - Constrain instances to choose from

I'm creating an SSM Command document to use with Run Command. This Run Command will operate on a schedule. One thing I'm unclear about is if there is any way to prevent choosing instances (as pictured below). I need this one command to run against a…
0
votes
2 answers

Run Powershell commands with API request, PUT request

https://learn.microsoft.com/en-us/rest/api/compute/virtual-machine-run-commands/create-or-update#request-body Could you please give an implementation example to apply the steps at the above documentation? I couldn't figure out what are the steps and…
Hilal
  • 41
  • 7
0
votes
0 answers

Why a Powershell script executes on a previous version of a file that has been changed?

I am trying to modify several values of a PowerShell script template prior to execution. The approach I took was to use the Get-Content command to read the template file, then to use the replace operand to replace the content with a content of my…
AdyM
  • 13
  • 4
0
votes
1 answer

If AWS Sessions Manager executes a file in EC2, which user in the executed EC2 executes the file?

When I execute a sh file in EC2 using AWS Sessions Manager's Run Command, does the user (root or other user I created) configured in the executed EC2 execute the sh? Also, how do I know which user executed it?
leo
  • 57
  • 1
  • 5
0
votes
1 answer

Rename mongo collection without knowing its namespace

I am using liquibase and mongo to execute a rename-migration like that: The renaming happens within…
Alkis Mavridis
  • 1,090
  • 12
  • 28
0
votes
2 answers

Schedule of Run Command in AWS Systems Manager

In my AWS account, under AWS Systems Manager > Run Command, I can see nothing under Commands tab but there are a lot of tasks records under Command history. I can see which document these tasks run on. However, I have no idea why there are so many…
Steve
  • 175
  • 1
  • 3
  • 14
0
votes
2 answers

Powershell code executed every time after allocating an Azure VM

i'm getting crazy with Azure APIS :-D we noticed that each PowerShell script "injected" via our internal application built using Azure Management Fluent API 1.34.0 is re-executed every time I allocate the VM. The script is stored in a storage…
0
votes
1 answer

MongoDB is it possible to runCommand distinct with substr on key

Is it possible to runCommand distinct with substr on the key I'm targeting? I keep getting missing : after property id : db.runCommand( { distinct: "mycollection", key: {"myfield" : { $substr: { "$myfield", 0, 10 } }}, } )
Daniel S
  • 621
  • 3
  • 8
  • 18
0
votes
0 answers

login via ssh using ssh.net (renci) to an external device always throws invalid command

I am using ssh.net to ssh to an external box, after running any command I always get "Invalid command\n" no matter what command I do write, there is not error in connection and I can see in Client.IsConnected = true and also if wrong password…
0
votes
1 answer

How to open a folder exactly named as an environment variable name, through Run Command?

Since I am working on a C# .NET application in which a portion imitates Windows Run command, I am doing some experiments with it. I have a folder exactly named as %userdomain% in ....Appdata\Local\Temp folder and I want to access through Windows Run…
Ashish Sinha
  • 87
  • 2
  • 10
0
votes
1 answer

Run Command Instructions to open and save excel file

I am using the run command. It starts with Start Excel.exe "Filepath\FileName.xls" This opens the file. A popup appears, and asks if you would like to update the links. I need to know what commands in the run commands to use that would: Tab and…
0
votes
1 answer

Missing startup.cs program.cs .Net Core Razor

I have a .Net Core 3 Web App using Razor pages. I was messing with solution explorer a few days ago and now I notice I'm missing startup.cs and program.cs. How can I restore them? I'm also getting this error: "Unable to run your project. The…
Ernesto Tello
  • 21
  • 1
  • 5
0
votes
0 answers

User not authorized for deployment when "runCommand" in "postSync" with run dotnet dll

I have IIS user and run under on him -postSync:runCommand. The command includes call for dotnet.exe and dll app with the migrations to db. ` I've created Rule (runCommand) in IIS/Management Service Delegation. For that I appointed a user from the…
0
votes
1 answer

Storing Value file from another VM as a varible in Bash

I have a set up that needs to be bootstrapped off the values of some files in another VM. Here is the run command I am using to invoke the run run command: BOOT_VM="${VM_NAME}1" BOOT_ENODE=$(az vm run-command invoke --name ${BOOT_VM} \ …
0xsegfault
  • 2,899
  • 6
  • 28
  • 58
0
votes
1 answer

How do i resolve this ambiguous Azure error?

I am using run commands to execute bash scripts via the Azure CLI bash scripts in RHEL 7 VM. I am getting an error when there is a snippet of the run command: az vm run-command invoke --name ${THIS_VM_NAME} \ --command-id…
0xsegfault
  • 2,899
  • 6
  • 28
  • 58