A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
2
votes
2answers
2k views

Integrated Authentication in IIS 6 from the command line

In deploying a new version of our ASP.NET application, we need to set the authentication method for a particular page to be "Integrated only." We can do this from the IIS managment console, but would ...
1
vote
3answers
9k views

Delete old windows print jobs

On our primary windows 2003 print server we share about 500 printers. We typically have about 50 stuck print jobs. Although far from the end of the world it bugs the hell out of me and I tend to end ...
2
votes
2answers
3k views

Is it possible to script DCOM permissions using built-in Windows Server 2003 tools?

Is it possible to script commands using batch commands, VBScript, or anything else? I need to modify a few DCOM components to grant permissions to local groups.
0
votes
2answers
3k views

batch for loop with bracket in the command

I have a batch file with the following code: for /f "tokens=*" %%a in ('dir /b /a-d') do ( echo Processing %%a >>%LOG% dtsrun /S(local) /NNotesLoad /A"FilePath:8="%NOTESDIR%\%%a" /AClientID=%...
1
vote
1answer
3k views

Elevated Powershell script

Is it possible to elevate the permissions of a powershell script so a user without admin privileges can run the script? Our network admins are trying to find more time-efficient ways to accomplish ...
2
votes
3answers
1k views

BASH Shell Scripting assistance, backup script extracts meta data from filename & moves file accordingly

So I need to build a shell script (a skill I am rubbish at, I think too linearly and make everything a pipe) that will connect to a remote machine to a specific directory slurp up all the files older ...
1
vote
4answers
751 views

Perl 5.10 logon/logout scripts

Given a mixed environment of Windows servers, Linux (RHEL5) servers, and XP clients, can anyone foresee benefits and/or problems attempting to use Perl 5.10 for logon/logout scripts? Thanks. Using *....
2
votes
5answers
4k views

Running Python scripts in linux

I'm trying to run Python scripts with a shebang on Ubuntu. When I create a python script #! /usr/bin/env python import sys ... and run it I get a shell error: root@host:/home/user# ./...
3
votes
2answers
273 views

What are the most prefered languages for writing a login script? Why? [closed]

I am in the process of building a new windows domain (migration from Novell) and need to write a login script to map network drives/printers. In the past I have used vbscript mixed in with a little ...
3
votes
1answer
4k views

How to add an Open Directory server via a script?

What is the best method to add an Open Directory server via a shell script on a brandly new imaged computer? I've created a new image with InstaDMG and I'd like to add the Open Directory Server via a ...
2
votes
6answers
883 views

examining http headers in shell scripts

How do I write a script that sends a get request to a web page and returns nicely formatted http headers?
12
votes
5answers
31k views

How to add a script to startup and shutdown in debian?

the title pretty much sums it up. how do I add a startup.sh and shutdown.sh of my server app to the startup and shutdown sequence of the Debian OS?
2
votes
2answers
3k views

Run script when user logs on or off

I am looking for a way to run a script1 when a user logs in2 AND and when they log out3 on their4 Windows5 machine. Notes: Perfect world script would mean Powershell script, but any script or ...
2
votes
3answers
4k views

Create an IIS website from a command line (or cscript)?

Is there a way to script the creation of an IIS 6 website? I don't have access to powershell, so it would have to use regular commands, or cscript scripts.
2
votes
2answers
3k views

How do I destroy or reset a file association in Windows Vista?

I inadvertantly got .py files stuck to opening my editor instead of running.
144
votes
11answers
280k views

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I ...
6
votes
7answers
2k views

Automating Administration Tasks on Windows

What tools do you use and recommend for automating administration tasks for Windows-based computers? Examples of such tasks include: Installing/upgrading software Standarizing application settings ...
1
vote
2answers
427 views

Script that can generate a listing of recently modified files [closed]

Is there a script (PHP?) that I can install (via FTP) and run that will give me a listing of the files that are modified AFTER a particular date on the entire domain?
1
vote
2answers
747 views

Shell script file name format

What does the following shell script mean? This is ksh and npfile is also a variable that contains a file name. fileName=${npFile##/*/}
776
votes
13answers
1.1m views

How to determine if a bash variable is empty?

What is the best way to determine if a variable in bash is empty ("")? I have heard that it is recommended that I do if [ "x$variable" = "x" ] Is that the correct way? (there must be something more ...
1
vote
3answers
9k views

Sample code for nice GUI for imageX? (to automatically deploy WIM-files using Windows PE)

I currently use this simple batch-file to deploy an image to our workstations: ECHO HALLO y: cd \ diskpart /s diskpartcmds.txt imagex.exe /apply y:\image.wim 1 c: bootsect /nt52 c: (Y: is a mounted ...
7
votes
1answer
464 views

Bash script parameters

I need to write a bash script, and would like it to parse unordered parameters of the format: scriptname --param1 <string> --param2 <string> --param3 <date> Is there a simple way ...
19
votes
14answers
4k views

What are some good resources for learning PowerShell scripting? [closed]

Are there online resources or books that you would recommend as an introduction to PowerShell scripting? The resources I've found primarily focus on interactive use.
5
votes
3answers
4k views

Can I “register” python scripts to execute on Windows?

I have Python 2.5 installed on Windows XP and a collection of scripts available in a certain directory. According to this article by Amanda Birmingham I can setup up a path for the Python executable ...
29
votes
14answers
19k views

How do I find out what version of Linux is running?

Sometimes your scripts need to behave differently on different Linux's. How can I determine which version of Linux a script is running on?
3
votes
6answers
6k views

How do I launch terminal commands into multiple tabs?

Is there a way with Applescript to launch multiple tabs in Terminal and execute commands against them? I have a project that requires me to launch several services in Terminal to run and monitor ...
2
votes
6answers
6k views

How best to script selected tables and data on SQL Server 2008?

The SQL Server Management Studio has the ability generate scripts. The problem is that it breaks on identity columns. I can't find a link to this bug at the moment but Microsoft basically declared it ...
2
votes
2answers
3k views

PowerShell Script to Get a Directory Total Size

I need to get the size of a directory, recursively. I have to do this every month or so. I want to make a powershell script to do it.
2
votes
3answers
493 views

What is the best way to backup mysql in s3?

mysqldump is probably not the best idea on running backups every x hours but is the one that we are currently using. The backups are around 150 Megs each so sending it to other machines could waste ...