Questions tagged [scripting]

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

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

Scripting is usually done in a scripting language. Such scripting languages are often dynamically typed and interpreted, as opposed to compiled languages. Examples of such languages include PowerShell, Perl and Bash.

1826 questions
13
votes
7 answers

How did you implement log management on your servers?

I'm trying to figure out how other people implement their log management systems. I have 20-30 Linux servers and a few Windows boxes (most of them virtualized). We utilize a lot of Perl and Bash scripts to do most of our automated jobs and I'm…
Edward
  • 449
  • 3
  • 12
13
votes
2 answers

AppCmd to create a virtual directory in default web site in IIS7

I try to create a virtual directory under the "Default Web Site" in IIS 7 using AppCmd. But first I'd like to see if one already exists. How can I use AppCmd to create a virtual directory under the "Default Web Site" and how can I do an…
Riri
  • 233
  • 1
  • 2
  • 6
13
votes
6 answers

Where do you normally keep your UNIX/Linux scripts?

There are numerous scripts that I have written for my server. Some of them are in my ~/scripts and some of them are in application directories. I am just wondering is there a directory that you would normally use to keep your shell scripts?
Kiril
  • 271
  • 1
  • 2
  • 7
13
votes
4 answers

How can I prevent a scheduled task from running if the same task is already running?

I have written a php script to check if there are any new files in a folder and, if any new files exist, upload them to a server. These files can be quite large. I want to run this script frequently-let's say every 5 min-as a scheduled task so…
Oren Hizkiya
  • 247
  • 1
  • 2
  • 6
13
votes
4 answers

How to create a Windows 2008 Advanced Firewall rules group definition through the command prompt

Is there a way to create a group, or add to an existing group, to a rule in Windows Advanced Firewall (preferable through a command prompt or WSH script). Edit:
frogstarr78
  • 485
  • 7
  • 18
13
votes
3 answers

Bash script to count number of files

I have a script and I want to display different messages if a file exists or not. I have a script like: count=ls /import/*.zip | wc -l echo "Number of files: " $count if [ "$count" > "0" ]; then echo "Import $count files" else echo "**** No…
Wallace Sean
  • 137
  • 1
  • 1
  • 6
13
votes
5 answers

Bash: Quotes getting stripped when a command is passed as argument to a function

I am trying to implement a dry run kind of mechanism for my script and facing the issue of quotes getting stripped off when a command is passed as an argument to a function and resulting in unexpected behavior. dry_run () { echo "$@" #printf…
Shoaibi
  • 809
  • 1
  • 10
  • 28
12
votes
1 answer

Manage Multiple IIS servers without shared configuration

We currently have 2 web servers IIS 8.5 in DEV We will push the servers to production to replace our current production servers My question is, is the a way to build scripts on the fly to apply configuration updates to production after being tested…
Anthony Fornito
  • 9,546
  • 1
  • 34
  • 124
12
votes
4 answers

How to lock out normal (non-admin) users during software installs?

We have a lot of thin clients running Windows Embedded Standard 7 and an SCCM 2012 R2 server to manage them. The thin clients have their write filters enabled (FBWF) so machine changes are not persistent. On the rare occasion we have to update…
Wes Sayeed
  • 1,902
  • 6
  • 28
  • 43
12
votes
4 answers

gpg-agent says agent exists, but gpg says agent doesn't exist?

I'm struggling with some issues while scripting gpg with bash on a Debian 6.0.6 box. I have a script that does a batch of operations and wants to make sure that a gpg-agent is available before it attempts to proceed. Since gpg-agent will take no…
Craig Ringer
  • 11,083
  • 9
  • 40
  • 61
12
votes
4 answers

how to find out the valid store names for certutil

I'm trying to find a way to script installing a certificate. Going "right-click->install certificate" works, and shows the certificate under 'subordinate certification authorities' in IE's certificate view If found the certutil.exe…
cobaco
  • 443
  • 1
  • 4
  • 10
12
votes
1 answer

How to start tomcat in remote debug mode under Ubuntu 10?

I'm getting crazy to set up Tomcat in remote debug mode under ubuntu 10. Basically I added this to /etc/init.d/tomcat6 (at the beginning): JAVA_OPTS="-Djava.awt.headless=true -Xmx256M -Xdebug…
gotch4
  • 275
  • 1
  • 3
  • 8
11
votes
9 answers

How to restrict the users' shell allowing to execute shell programs

Is it possible to prevent any user to not use commands like ls, rm and other system commands which could harm the system. But the users should be able to execute shell programs.
Hulk
  • 391
  • 1
  • 6
  • 17
11
votes
2 answers

How to export a Full SMTP Log in Office 365

In Office 365, is it possible to export the SMTP log? Maybe in powershell or any other way. My goal is to have a complete overview of all messages send from and to a specific domain.
ZEDA-NL
  • 846
  • 1
  • 6
  • 13
11
votes
3 answers

Powershell Parameters

I have a Param block in my script Param ( [Parameter(Mandatory=$True)] [string]$FileLocation, [Parameter(Mandatory=$True)] [string]$password = Read-Host "Type the password you would like to set all the users to"…
TechGuyTJ
  • 792
  • 1
  • 13
  • 26