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

learn more… | top users | synonyms (2)

1
vote
2answers
146 views

powershell script to create exchange report

I have some script write on PowerShell and I have some problem. When I run this script I have some error in output: You cannot call a method on a null-valued expression. At ...
0
votes
0answers
46 views

Automated Logon with Macro backup script

I'm having some issues with an automated backup macro script I've written using Autohotkeys. My specific issue is that I need the script to run on a Windows based server at a given time during the ...
1
vote
2answers
131 views

find: how to not have errors (stderr) when no files exists

I have a custom script which gzip log files when they are one day old. In my script all errors (stderr) are logged to a file and at the end of the script I use this file to know if its execution was ...
-1
votes
1answer
315 views

Vbscript proxy settings

I'm trying to create a script that allows the user to choose which proxy settings want to use among several possible. The changes are applied correctly but takes about 20 or 30 seconds to appear at ...
2
votes
1answer
245 views

Powershell - Select-object keeping same columns throughout script

OK. I'm just drawing a blank here or I'm missing something obvious. In a Powershell (V3) script, I'm calling Get-ADUser -Filter 'SAMAccoutnName -like $ADUserName' -Properties ...
1
vote
1answer
81 views

Schedule Task 2008 R2 - cmd line requires unix utc time - how to get it dynamically?

These forums are great, and I'm hoping to get some help with a headache I have on doing a process manually that should be easier to automate than I've found it to be. I have a command line tool from ...
27
votes
5answers
2k views

How can a Linux Administrator improve their shell scripting and automation skills?

In my organization, I work with a group of NOC staff, budding junior engineers and a handful of senior engineers; all with a focus on Linux. One interesting step in the way the company grows talent is ...
2
votes
3answers
786 views

Add user account to local Administrator group on multiple Windows Server 2008 machines

I have a number of servers to which I need to grant administrative access to 1 particular user, i.e. add him to local admins. I guess it can be scripted with PowerShell or somehow else.. Can somebody ...
1
vote
1answer
140 views

Automatic Saving of Windows Event Logs [closed]

I'm looking for a way to automatically save off Windows security event logs from several servers to one central location (connected on the network and domain). I want to be able to do this on a ...
0
votes
1answer
666 views

Postfix: Pass a copy of an email to a script but deliver the original one to mailbox

It's actually quite simple: I want to pass all incoming emails to a PHP-script, but only as a copy, the original email shall still be delivered to the mailbox as usual. I just can't seem to get it ...
0
votes
2answers
174 views

Command line adding a printer with duplex and fax enabled

We have an OCE Imagistics cm2520 unit, a big copier that does fax and duplex printing. Currently I'm trying to have our XP workstations print without using a Windows print server, but just using the ...
2
votes
2answers
253 views

Add time stamp to script log entries

Currently I have my bash script using exec 22>&2 21>&1 1>$log 2>&1 to write stderr and stdout to a log file. I would like to add a time stamp for each entry, but I haven't ...
1
vote
2answers
359 views

Shell script command output in if condition comparison fails to compare to same value string

I'm incorporating a script snippet which determines Android version via: adb shell getprop ro.build.version.release which returns: 4.1.2 or 4.0.4 The snippet currently looks like this: if [ "$(adb ...
4
votes
1answer
594 views

Assign Static MAC address to VM Hyperv

I have a scenario that involves building out a ton of virtual machines in Hyper-V, I cannot use SCVMM and must use a scripted method to create these VMs. I have a CSV with all required information ...
0
votes
1answer
1k views

Using Powershell to Create Exchange Contacts from a .CSV file

What I would like to do is use a Powershell script to create Contacts within a certain folder in Active Directory from a .csv file. This script should allow me to create the first part of an email ...
1
vote
1answer
140 views

Scripting WINS Tombstone Removal

I'm creating a script to remove the tombstoned entries in WINS (required for exchange w/ multi domains). What I'd like to know is if removing those old entries will break anything? Or if there's ...
4
votes
2answers
321 views

How to get from a Hyper-V 2008 R2 node with Powershell the IP address and Vlan ID

I tried to take from the Hyper-V (Hyper-V 2012) node with this command the IP address: Get-VM | select -ExpandProperty networkadapters | select vmname, ipaddress The thing is that i take as an ...
4
votes
1answer
263 views

Run specific script after every Windows Update

Is there a way to run a specific script each time Windows update completes (i.e., after reboot or after an update that doesn't require a reboot)? My application is suffering from MSCOMCTL.OCX ...
-1
votes
1answer
159 views

sed regexp for replacing xxx in define('DB_PASSWORD', 'xxxx');?

I'm looking for a regexp to quickly replace the password inside the following wp-config file, like so: define('DB_PASSWORD', 'xxxx'); Now the config file has many defines, so it essential to only ...
-1
votes
1answer
104 views

portqry to check connectivity

Is it possible to check the connectivity between 2 remote servers using portqry given that the portqry.exe command is executed on another server. for example, check the connectivity between serverA ...
2
votes
5answers
229 views

debian bash/sh string execution

I am stuck with this piece of code here user@server:~$ TEST="ssh rsync@otherserver.example.org 'date; hostname -A; uname -a'" user@server:~$ $TEST bash: date; hostname -A; uname -a: Command not ...
0
votes
1answer
145 views

Windows Login straight to Terminal Server

Essentially I'm looking for some way via batch (or potentially powershell, but win XP machines so ideally batch) to open up a RDP connection to a LAN based Terminal Server upon a user logging into a ...
0
votes
1answer
66 views

Script to move Maildir contents to its parent dir but for multiple folders

I totally suck at Bash/Python/Ruby/Perl Scripting (need to practice/learn some more) so I'm asking for a little help :-) I need to move about the contents of about 60 Maildirs to their parent folder ...
0
votes
0answers
140 views

using Lua Scripting in Nginx under windows

i've originally asked a question on stackoverflow but as i didn't get any answers while reading an Article i've noticed i can use lua to do what i need but LuaModule's installation guide doesn't say ...
1
vote
2answers
79 views

computer startup script reporting success to a server

I am using Group Policy to deploy a computer startup script that tries to uninstall one program and install another. I need this script to report its status (whether a certain file exists on the ...
0
votes
1answer
72 views

Auto-restart “screen” script not working

I'm looking over a script that would actually be restarting game-servers in case they crash. The game-servers are actually started in a screen session through a control panel. They have to be ...
1
vote
1answer
235 views

Set the username and password for DCOM application

Is there a way to run a script against a remote machine to enter the username and password for a specific DCOM application? Locally on the server, I can open up Command Prompt, and type: dcomperm ...
2
votes
1answer
64 views

Test Multiple Server for login (WIndows 2008)

I currently run a PING sanity check test (batch file with result file) on over 80 servers in 4 environment. But, even if we "ping" ok 100% of the servers, it doesn't mean that the machine are working ...
0
votes
0answers
100 views

Suggestions for passing script status back to master controller service

I want to automate our update and upgrade process. What I would like to achieve is a controlling server executes a script of some description on the remote server, it knows the status of the remote ...
0
votes
1answer
58 views

Script to rename home folder from a name to an assigned number

I am looking to rename some home folders within AD to and card ID number for my users. i want to eliminate having to manipulate a home folder for a user when the name changes so we are going to a ...
0
votes
2answers
91 views

monit displays false number from my uptime script

I've wrote a script for fetch real uptime and display in monit. But I think it displays just exit error status. My uptime script is: #!/bin/sh uptime=`uptime | awk -F " " '{print $3}'` echo $uptime ...
1
vote
1answer
245 views

Is there a programmatic way to determine free disk space on a Linux server?

I have a collection of Linux servers, each of which has a local hard drive with a /tmp directory. Occasionally, the /tmp directory on a server will fill up and cause errors. I want to automate the ...
0
votes
1answer
190 views

Issue with ifconfig in a shell script (using cron)

If I execute this script manually in Debian: #!/bin/bash /sbin/ifconfig wlan0 down /sbin/ifconfig wlan0 up sudo iwconfig wlan0 essid "WLAN_NETWORK" sudo iwconfig wlan0 key myPassword sudo dhclient ...
4
votes
5answers
1k views

Powershell script to delete oldest files (not relative to current date)

I DO NOT want to "delete files older than X days." If I wanted to do this, I'd just pick one of the thousands of scripts out there that have already been written for that purpose, and I wouldn't ...
2
votes
1answer
211 views

Red hat script on shutdown

I need to backup some files every time i will shutdown a Red Hat enterprise 4 Linux. I thought about make it with a script in /etc/rc0.d but shutdown process should wait for my script to finish. So ...
1
vote
1answer
68 views

suggestions on scripting a move of lots of files from one linux host to another [closed]

I've got several TB and many thousands of files I need to move across the network from one Linux host to another. I'd like to get suggestions on how to script this with the following points in mind: ...
0
votes
1answer
83 views

Backing up remote Postgres database

I have a Windows 2008 Server machine with a postgres database running on it. I'd like to back it up daily and have it sent to another machine (running Ubuntu or Windows). What's the best way to set ...
-1
votes
3answers
60 views

What shell scripts have run [closed]

Is there any way to determine what shell scripts ran within a certain time frame? I.e. I need to know all the shell scripts that ran yesterday between 2:00 an 5:00.
0
votes
2answers
595 views

Need to modify VB script so it deletes all existing network printers first

We have a fantastic VB script that adds multiple network printers, then goes on to select one of them to be the default. Dim multiPrinter, UNCpath1, UNCpath2, UNCpath3 UNCpath1 = "\\server\printer1" ...
-3
votes
1answer
63 views

On linux, how can I create script to reboot server if it loses internet for x hours? [closed]

I have ubuntu server that has some services that only come back after loosing internet for an extended period of time with a reboot. Does anyone have a script that can reboot server if lose internet ...
1
vote
2answers
289 views

How to prevent termination of long-running Python script

I have a cron job running a Python script on a VM-based remote Ubuntu server. The script takes a couple hours to run, and I'm noticing the kernel appears to be terminating the script before it ...
1
vote
1answer
183 views

Batch script to create home home directories from list of names

I'm trying to create a home directories with permissions from a text file. I can only get the batch file to run the first line. Can anyone tell me why? I initiate the scripts by running go.bat as ...
0
votes
0answers
41 views

Server setup scripts, patches and migrations

I have written some scripts which I use to configure various servers in a uniform way. Each time I deploy a server I run the relevant scripts so that I know they're all configured the same. I then ...
0
votes
1answer
250 views

.bat file - Nagios v3.2 service check and start if stopped

I'm just barely getting into programming so I do apologize for my ignorance. I'm trying to create a .bat file that will check if a service is running on XP Pro. If service is running it will exit 0. ...
12
votes
2answers
270 views

What is the industry standard method for administering the change of the local administrator password for all machines on a domain?

Although there appears to be three available options, one of which is actually secure, there seems to be only two available choices that will be able to impact machines that are not powered on at the ...
0
votes
1answer
75 views

Changing Zone files with sed

I have this dns zone file I was unable to change the resource record type A to CNAME @ IN SOA ns1.domain.com. webdev.domain.com. ( 2006080101 ; serial 8H ; refresh 2H ...
3
votes
1answer
53 views

Getting WINS Server Statistics

I know WINS is ancient. No need to remind me. For what it's worth, this effort is going toward a project to retire it from the environment altogether. But before I can do that - I need to be able to ...
0
votes
1answer
32 views

Running server side applications that have no front end or user interaction.

I am setting up a system that required a series of scripts that run 24/7 quering a database to check if data meets certain requirements and then triggers alarms as well as inserting data into the ...
-4
votes
1answer
732 views

How to automate a transfer of file from server to local system using ftp

I have a windows server 2003 which generates backup file to ftp folder in the server(using my own script). And I will ftp and copy it to my local hard disk daily. How can I automate this process using ...
-1
votes
1answer
79 views

ESXi free scripting [closed]

I am trying to figure out if it is possible to script commands on the esxi system to run commands on the esxi system after the first auto start vm at a specific time after it is powered on before the ...