Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [scripting]

A form of computer programming that — in the context of system administration — lends it self well to automating tasks.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

PowerShell - List WSUS Updates Needed for Each Client

I need to provide a monthly report to our client listing the updates needed by each Windows server in our environment. Ideally, the report would list the updates for the month and the servers in my ...
user avatar
  • 578
0 votes
1 answer
21 views

Failing string replacement in xargs command

I am trying to automatically create symlinks to directories and to replace a certain text string (foo) of the original name in the link name (bar). The name of the target directories may contain ...
user avatar
-2 votes
2 answers
32 views

what the meaning of #!/usr/bin/php -q

I look at some php script in centos,I notice there is #!/usr/bin/php -q What is the meaning of this option? because I cannot see it in php --help
user avatar
0 votes
0 answers
24 views

How to pass multiple arguments through ssh and use those arguments in the ssh script?

I have written one script on lets say server1 and from that script I want to execute script Start_UI_AdminApp.sh on server2 through ssh. I also need to pass the arguments while executing this ssh ...
user avatar
0 votes
1 answer
40 views

Windows Equivalent to `sha256sum -c` (cryptographic hash, digest file, recursive integrity check, SHA256SUMS)

What is the equivalent to sha256sum -c in Windows? I have a set of very important files that I need to copy-to and mirror across many different types of disks in many geographically distinct locations....
user avatar
0 votes
1 answer
96 views

How can I set the 'The other domain supports Kerberos AES Encryption' setting programmatically?

In the GUI (Active Directory Domains and Trusts MMC Snap-in (domain.msc)), you can set the "The other domain supports Kerberos AES Encryption" setting for a trust relationship: I am looking ...
user avatar
0 votes
1 answer
46 views

Continue statement doesn't work as it should - bash

For the context, i have an infrastructure of multiple machines using ssh. We connect via ssh as root on the machines without password thank's to the authorized_keys file on each mchine. We are adding ...
user avatar
0 votes
0 answers
18 views

Regular expression to consider all directory and remove if particular folder matches

I want to write a regular expression to consider all the directory which start from "system" and delete if particular folder struture present with name "Remote" currently Provided ...
user avatar
0 votes
1 answer
56 views

Ansible; add hosts to inventory by script

I just started working with/learning to use Ansible. I want to add hosts to an inventory file using a script, and I am wondering if there is a command line tool to accomplish that. Something that ...
user avatar
  • 15
0 votes
0 answers
10 views

Is it possible to trigger a 550 SMTP answer from a script Postfix piped a mail to?

I want to prevent backscatter from within a mailing list script that I use on my Postfix mail server. Mail for a mailing list hosted there is piped to my script. At this point, Postfix can't know if ...
user avatar
0 votes
1 answer
163 views

CMD - Check if exist firewall rule, and add if not

I need some help to make an script that check if exist a rule, and add if not. It auto add all exe inside a folder where i run it. @echo off cls Echo.--------------------------------------------------...
user avatar
  • 1
0 votes
1 answer
46 views

only flush the write cache if there's no read activity

Normally the Linux Kernel flushes the write cache if a specified time limit is exeeded or the cache is full. This leads to stalling with HDDs since the writing process makes reading processes much ...
user avatar
  • 13
0 votes
0 answers
34 views

CentOS - listing size of top-level directories in a 50TB NTFS volume is way too slow

What I want to achieve is get the information about how big are the top-level folders in a directory (which is a NTFS volume) on a CentOS7 server. This information is placed in a Prometheus file, ...
user avatar
-1 votes
2 answers
55 views

how to automate servers installation with virtualization/LAMP (small IaC)?

How to automate server installation? What infrastructure/systems fit our needs? We have over 10 phisical servers with over 100 VMs, mostly LAMP. Not too many but also not anything that can keep ...
user avatar
  • 301
0 votes
2 answers
32 views

How to script a check that the key in known_hosts file is correct

I would like to implement a function in a script that checks if the key that corresponds to a given host in known_hosts file is correct. The obvious way to do this is to attempt an ssh connection and ...
user avatar
0 votes
0 answers
43 views

Using NETDOM to remove trust between domains

following is NETDOM trust command to remove trust between domains, it is being used in batch script that I plan to run remotely on multiple "Trusting Domains" It works when run locally (...
user avatar
  • 1
0 votes
0 answers
21 views

Docker station Iptables task

I have a virtual machine running on VBox. This VM contains the host and three dockers, let`s name the dockers as the_first, the_second, the_third. I want to apply a filter on network firewall with ...
user avatar
0 votes
0 answers
55 views

Running ps command with 'Irix mode' off

I know that within the interactive 'top' screen, I can press 'Shift + i' to turn off 'Irix mode' Is there a way to do the same thing with 'ps' command? I am trying the below mini script to print out ...
user avatar
0 votes
1 answer
46 views

how to use BASH to convert the path to the home folder in the variable bash, in quotation marks into a working one

Use the script, I am trying to create a directory in my home folder. Due to the specifics of integration with terraforms, parameters are passed in this way: variable = "value" It would be ...
user avatar
  • 1
0 votes
1 answer
48 views

How to convert BASH script to DASH or other solutions?

I am creating an AWS distributor package to modify the syslog configuration on different flavors of Linux servers. I wrote a few simple bash scripts to handle the install, uninstall, and update. I ...
user avatar
  • 3,130
1 vote
0 answers
116 views

How to export the details of a digital certificate (.cer file) to a csv file using powershell?

I have a digital certificate that I'm using for a specific task. I need to export the details of the certificate such as the serial number and issuer to a csv file that is already on my computer using ...
user avatar
  • 11
0 votes
2 answers
68 views

write shell script or other script on vCenter

esxcli is existed on vSphere. But I need to write script on vCenter and vCenter doesn't have esxcli command. How can I write script for vCenter?
user avatar
0 votes
1 answer
295 views

Handle exception with long paths in Powershell

I am new here and I facing issues with my powershell script whith long paths. This script aims to get relative path and hash from files/folders and its subfolders. It works with some with others I get ...
user avatar
  • 1
0 votes
1 answer
44 views

Remote deployment of a script on linux

We are creating a lab and wanted to setup like 10-15 hosts with ldap. We need to install on each computer some packages that are necessary to run ldap, so my question is - can I somehow run 1 bash ...
user avatar
  • 1
1 vote
1 answer
60 views

weird behaviour in a Windows 2019 .BAT script

I have to restore a backup from a Linux MariaDB to a Windows MariaDB, where the PowerBI gateway will import its data. "mariabackup" is MariaDB's physical backup tool. But to restore it, the ...
user avatar
1 vote
2 answers
520 views

Curl Command Send Asynchronous Request

I using this curl request for sending data to API : curl --location --request POST 'MY_IP' \ --header 'Content-Type: text/plain' \ --data-raw ' [{ "event_id": "123", }] ' ...
user avatar
  • 11
0 votes
0 answers
27 views

Is there a way to add a comment to a DHCP dynamic simple queue?

I simply want to add a comment (specifically, add the host name) to the simple queues created by the DHCP rate limit option. However, while scripting, when I tried the command /queue simple set dhcp-...
user avatar
  • 266
0 votes
1 answer
67 views

whats the diffrence between "command.sh > /dev/null 2>&1" vs "command.sh 2>&1 >/dev/null"

I have many shell and python scripts on my crontab that ending either with: command.sh > /dev/null 2>&1 or command.sh 2>&1 >/dev/null I know that: > is for redirect /dev/...
user avatar
-1 votes
2 answers
194 views

Find file duplicates and convert them into links [WINDOWS] [closed]

My users tend to save tons of duplicate files what consumes more and more space and generate HW and archiving cost. Im thinking to create some scheduled job, to: find duplicate files (check file MD5 ...
user avatar
  • 123
0 votes
0 answers
55 views

Alternative location to store tmp files on linux

So I have a python script that I compile with pyinstaller to a single file. at the time of running, by default, the script will unbundle the modules in /tmp/ also you can change the default TMPDIR at ...
user avatar
0 votes
0 answers
51 views

How can I mitigate the risks of intentionally allowing users to run code on a server, in a resource-efficient manner?

To summarize: I want to run multiple servers on a host, for different groups of users, and allow them to add and modify functionality of the servers at runtime with some form of scripting. This is a ...
user avatar
  • 1
0 votes
0 answers
69 views

Configure NGINX to deliver different JSON content based on $http_referrer

I am working on a service + webapp + mobile app combo where the mobile app is used to consume content created by an open community of authors on the web app with the whole being serviced by a server ...
user avatar
  • 173
0 votes
2 answers
106 views

PowerShell: Why am I getting this error?

I am trying to use the PowerShell Invoke command. I am using it correct but I don't know why I am getting an error. Invoke-Command Get-EventLog –LogName Security –Newest 100 -ComputerName WIN-...
user avatar
0 votes
0 answers
42 views

How to merge two data sources with slightly different folder names

How can I copy all .msg files that are spread throughout some GUID sub-folders in one folder to another folder that has a slightly different folder name at the end. Is it possible? So for example: ...
user avatar
  • 1
0 votes
1 answer
1k views

Not able to access groovy variable inside shell script in JenkinsFile

def NAMESPACE = "Dev" def BODY= sh( script:'''body=$(cat <<-EOF { "name": "${NAMESPACE}", "type": "regularwebapp" } EOF ) (echo $body)''...
user avatar
  • 1
-2 votes
1 answer
353 views

Programatically get full path to binary in powershell (which, where, Get-Command)

How do I get the absolute path to a given binary and store it to a variable? What is the equivalent to the following for Linux Bash in Windows Powershell? user@disp985:~$ path=`which gpg` user@disp985:...
user avatar
0 votes
1 answer
143 views

command that cannot work in background (asterisk)

am trying to run script in background which contain command such like "asterisk -rvd >> xyz.log", when I run it directly it work well but when run it with any background way (service, ...
user avatar
  • 1
0 votes
0 answers
178 views

Adding "Never saved" websites to Edge via Group Policy, Registry, Script, etc

I would like to push "Never saved" websites to users' Chromium Edge settings. The goal is to disable password saving for these particular websites/domains. The method doesn't matter, only ...
user avatar
  • 690
0 votes
0 answers
27 views

how to launch a script using an alert in gcp?

I want to generate an alert in Monitoring and Login and I want that when that alert is triggered, my script is executed (which I already have generated in my cloud repository), how could I do it?
user avatar
  • 1
0 votes
1 answer
49 views

Domain users last logon time on a specific (domain joined) computer

So I have all the once_logged_in profiles listed in C:\Users folder but I need to find out when was the last time these users logged in onto the same computer locally or remotely with their domain ...
user avatar
  • 11
0 votes
1 answer
161 views

I Have a problems with qoutes in my bash script [closed]

how to do so that in this script which searches for something from the database. he searched for it and changed its name in the terminal. I have a problem with the quotes here. Maybe anyone know how ...
user avatar
0 votes
2 answers
136 views

How to setup a daily report of users which are sending more than a defined numer of email outside organization within 24h

I'm trying to create a script and schedule it on exchange in order to have a daily report for users which are sending more than a defined numer of email outside organization within 24h. I found this ...
user avatar
  • 1
0 votes
1 answer
607 views

How to select using script on Task Scheduler the "run with highest privileges"

Hi I'm doing some scripting to add a task on a Task Scheduler. However I need to have a script to select the "run with highest privileges". Sample code: Dim settings Set settings = ...
user avatar
0 votes
1 answer
34 views

Restart services on multiple remote servers securely

I need to write a script so that my colleagues and myself can restart different services on multiple servers. We all connect to the servers with LDAP so i'd like my script to connect our LDAP users to ...
user avatar
  • 91
1 vote
0 answers
483 views

Powershell Script setting WMI CIMV2 Permissions

I am currently trying do change up a script so that I can put it into a GPO. The Script itself works but I want to do a "if else" around it. The Script is found here: https://gist.github.com/...
user avatar
  • 36
0 votes
2 answers
90 views

Awk script to filter text output to single line

I have a script that is giving me an output like this: ruby-devel is needed by software1 tcl is needed by software 2 python3 is needed by software 3 ocaml is needed by software 1 I'm new to awk but ...
user avatar
0 votes
2 answers
7k views

Script not running on startup for GPO

I have seen many posts on this website about something similar but none of them have had the resources to fix my issue so I will go into as much detail as I can. If I leave any information out let me ...
user avatar
  • 3
0 votes
0 answers
42 views

Capture and convert Windows Defender Firewall log to allow rules

is there a way to capture the Windows firewall traffic (TCP/UDP, Ports, IPs) for some time and then convert them to allowed firewall rules on Windows systems? It would make sense in my opinion to ...
user avatar
  • 73
1 vote
1 answer
179 views

Anyone know of a script, program, etc... to check folder/file permissions and repair/restore?

I am not a newb. I am a professional imploring to other professionals over their discoveries of a quick solution to a common problem, and I know what chmod -R is. This is in response to the -1 rating ...
user avatar
  • 23
-1 votes
3 answers
1k views

Adobe Reader DC automated install using PowerShell

I wanted to automate the installation of Adobe Reader DC using an existing executable file (AcroRdrDC1501020060_en_US.exe) present in my local computer with a PowerShell script in non-interactive ...
user avatar

1
2 3 4 5
36