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)

0
votes
2answers
22 views

Script out SQL Job Create Statement Without SSMS

Does anyone have an idea of how to generate the Create statement for a SQL Agent Job? I've looked everywhere, and I can't seem to find a search result that doesn't involve using SSMS and going ...
1
vote
1answer
35 views

Monitor a process using monit in ubuntu

On my server I have started a service using a script created by myself. I want to monitor that process using monit. I didn't see any .pid file for that process in the /var/run directory. How can I ...
-1
votes
2answers
24 views

How to run batch file without a window in ONE file

I know how to run batch files without a window thanks to this question here: Run a .bat file in a scheduled task without a window. The first answer is the one I am using. It states that to run a ...
0
votes
2answers
35 views

Powershell script that executes another powershell remotely

It's a long story, but I need to create a SQL trigger that executes a script remotely which executes another script remotely (yeah, I know). I'm using PowerShell. I have started at the end: ...
0
votes
2answers
59 views

Ola Hallengren's SQL Backup to Network Location not working

Good Evening All, I have set up Ola Hallengren's SQL Server Maintenance Solution on several SQL Express servers (2008 to 2012 R2) in the past few years. I recently have started having issues with the ...
2
votes
1answer
26 views

Automate Windows Server 2008 Local Policy Changes?

I'm a student assistant in IT at a large organization with several less than cooperative separate IT departments. My little IT group currently doesn't have Active Directory rights to send a Group ...
0
votes
1answer
32 views

Script to delete users profile only months old profile with the Registry itself but should leave current profile intact

first of all sry if this post is repetitive for the profile deletion. If you have a correct link please post it below or the script itself. Question: as i have a lot of computers with windows 7 ...
0
votes
0answers
29 views

Shell script permission denied despite +x flag [migrated]

This is an odd one, it only happens on one server (shared hosting, so I have limited access to configuration and logs), but I can't wrap my head around it. I have a shell script which runs some app's ...
1
vote
1answer
40 views

Will systeminfo's “OS Name:” line distinguish between Windows 2003 and 2003 R2?

First, please verify visually that you have a 2003 R2 installation by opening Control Panel\System Properties and checking that R2 is shown like this: Alternatively, R2 should be mentioned on the ...
0
votes
1answer
47 views

Is there a way to restart automatically the HHVM service if I get a '502 Bad Gateway Error'?

I've reported the error on stackoverflow - from time to time my Nginx/PageSpeed+HHVM+MariaDB+WordPress blog stops working. There is some problem with the HHVM service that I don't locate, and I'm ...
0
votes
0answers
17 views

lftp mirror leaves empty folders on remote

My script is set up with this for lftp lftp -p 2218 -u $login,$pass sftp://$host << EOF set mirror:use-pget-n 5 mirror -c -P5 --depth-first --Remove-source-files ...
1
vote
3answers
71 views

Batch script to export info from Active Directory (name, phone numbers, location, etc) into a csv file

The secretary at my work uses a spreadsheet that lists names, phone numbers, and locations of employees to look up info if someone asks. All this info is located in AD, but the problem is that we are ...
0
votes
1answer
47 views

Zabbix: debug external script

I have made an external script (snmp_max_io written in Perl). When run with and IP-address, it logs input to syslog and it prints a single 64-bit numeric value and set the exit value to 0. Example ...
0
votes
2answers
116 views

CentOS 7: Getting interface IP numbers

I am trying to autopopulate the /etc/issue in a CentOS 7 image (this will be a template, and it needs to be easy to identify the resultant VMs at a glance). I have the following in my ...
1
vote
1answer
16 views

Modifying xml definition of a running KVM domain via script

How can I modify the xml definition of a VM over ssh? I know that I can do this interactively by logging into the host and using: virsh edit <domain name> But I want to automate this ...
-1
votes
0answers
19 views

How can I perform the an rsync command from a local machine?

I am trying to automate some tasks that require the following command to be performed to transfer files between servers. I would like to make it part of a bashscript. rsync -rltDvPh -e "ssh -i {path ...
0
votes
0answers
24 views

Modifying squid proxy configuration programmatically

Is there any way to manage squid proxy programmatically, so I can add a cache peer or modify an access list using something like an api for squid?
-1
votes
1answer
47 views

DNS server with scripting [closed]

I would like to know if there's any way of having a DNS server on Linux that runs a script and reply a different IP list depending on the script data returned. I've searched Google for 'DNS server ...
0
votes
0answers
42 views

7z from bash script won't exclude directories [migrated]

I've encountered with kinda strange behaviour of 7z (or bash, I don't know yet.). With the following script: #!/bin/bash find /home/user -type f -name "*.pdf" | cut -c 10- > ...
1
vote
2answers
69 views

How to automate GPG file decryption over SSH?

I would like to use GnuPG to decrypt short messages that are stored on a remote host (running Linux), i.e.: ssh [<user>@]<host> gpg -d <file-to-decrypt> interact with gpg-agent ...
-1
votes
1answer
33 views

how can i redirect run program command on different server [closed]

I have 2 server Linux server (RHEL5). Server1 is running X server where users connect to it with VNC/NX and the other one is for running programs. So users don't interrupt to each other, I want to ...
-1
votes
2answers
46 views

How to discover my own IP address after login? [duplicate]

When I use SSH to connect to a Linux server, I see a message informing me about the origin of my last login. For instance: Last login: Mon Jul 7 14:37:09 2014 from host.example.net I would like to ...
7
votes
1answer
163 views

How do I remotely issue a CLI command to thousands of Windows domain computers at once?

I need to issue a CLI command (cmd.exe or PowerShell) to all of the thousands of computers on my domain. For obvious reasons, this is not going to involve doing the task manually, or physically ...
-2
votes
2answers
46 views

Check if an Antivirus is installed and enabled

I work in an entreprise with a lot of pcs > 1000 with os windows xp and 7 and symantec antivirus installed on it the probleme is : -how to check if the antivirus is installed on the computers -and ...
0
votes
3answers
40 views

How do I gather OS information about all users in AD?

I'm looking to make a script or something along those lines which will allow me to check the OS version of all users within the AD, without interrupting daily operations. So far i've found this script ...
33
votes
8answers
3k views

How can I run arbitrarily complex command using sudo over ssh?

I have a system that I can only log in to under my username (myuser), but I need to run commands as other user (scriptuser). So far, I have come up with the following to run the commands I need: ssh ...
0
votes
2answers
49 views

Bash Script keeps respawning after it should die

#!/bin/bash PID=$(pidof daemon) kill $PID while ps -e | grep "[d]aemon" >> /dev/null; do sleep 30 done sh -c /root/daemon This script is set on a cronjob to kill and restart this program. It ...
1
vote
2answers
70 views

script to count the occurence of the particular string in the given time interval

We are trying to write a script "sendemail.sh" to count the number of occurrence of a particular string in a log file "SendEmail.log" within the given interval. We have a log file. In that we are ...
0
votes
2answers
186 views

Exception calling “UploadFile” with “2” argument(s): “The Content-Type header cannot be set to a multipart type for this request.” [duplicate]

I am working with a script that is supposed to first check if a PC is alive then FTP a file to a server. However, when running the script I am getting the following error: Exception calling ...
1
vote
1answer
325 views

Looking for a powershell script that can pull a file from a set of PC's and FTP

I'm looking to write a script (preferably powershell) that will essentially copy a file from a bunch of PC's and FTP it to a server. So the structure of the environment is that we have a file on ...
1
vote
2answers
252 views

Can I use rsync to create a list of only changed files?

I am using rsync in a bash script to keep files in sync between a few servers and a NAS. One issue I have run into is trying to generate a list of the files that have changed from the during the ...
-2
votes
1answer
100 views

powershell script that outputs date of the day as a file name

I have a script which lists local admins of all hosts in Active Directory below: $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"") $Searcher.Filter = "(objectClass=computer)" ...
0
votes
1answer
79 views

Why does this command to send emails work from the shell but not as a cron job?

I have a problem with cron jobs, I need to send email notification to users, I use this command curl "http://example.com/index.php?option=com_community&task=cron">/dev/null 2>&1 When ...
0
votes
1answer
26 views

Detect which scripts are using old interpreters

I have a few Debian machines with some nearly-orphaned script interpreters, for example /bin/bash3 and /usr/bin/perl510. How can I detect those scripts that still have the aforementioned interpreters ...
2
votes
1answer
116 views

Server Reboot Script - No Credentials

I'm looking at running a script to reboot a Windows 2012 server nightly, and all the guides seem to be for using scheduled tasks. As far as I know though, a change in the admin credentials will break ...
0
votes
1answer
150 views

Automate app pool recycling of an Azure Cloud Service Web Role

How can I script (e.g. using PowerShell) the action to recycle the app pool of a web site hosted in a Web Role on Azure Cloud Services? Only one instance of the cloud service is running (used for ...
0
votes
1answer
40 views

Rebuilding MS Agent Jobs from MSDB table

This morning our DB server died. They restored backups to another server but these didn't include the many MS Agent jobs. Anyway I have managed to get a backup of the old MSDB table where all the ...
0
votes
1answer
47 views

Find Users without a password in UNIX AIX

I'm searching for a script that finds users who don't have a password. Could anybody please explain me the commands that are needed in such a script?
0
votes
1answer
135 views

Screensaver startup script (batch or reg) GPO, silent install

I have an application, which after it disconnects from a VPN connection, resets the screensaver settings. What I'd like to do is create a GPO script or batch file to run every time the user logs into ...
2
votes
2answers
284 views

AD Group and Distribution Group with O365

I have a O365 with Exchange, and a local AD. I want to manage distribution groups and distribution groups members via PS scripts (that will run by scheduled task), that look users' AD attributes ...
-2
votes
1answer
54 views

how to write a script to get ifInOctets and ifOutOctets? [closed]

Can any one help me with writing a script to get ifInOctets and ifOutOctets from a server 10.38.2.24 ? I need help
0
votes
1answer
55 views

VBscript - returning the path & size of a file

I would like to add a piece of code to SYDI that would return me the location & size of a specific file. For example, a server "X" has a DB file(s) & path like this: ...
2
votes
2answers
205 views

How to split logs according to patterns?

I would like to be able to split log files according to a pattern found in them. For example process all logs and look for /(\w+)\s to match /myresource but exclude /myresource/anythingelse, to ...
2
votes
2answers
37 views

Detecting in a script whether apache2 root is /var/www or /var/www/html

Apache2 recently changed the default root directory from /var/www to /var/www/html, which breaks the scripts I distribute for installing some software I wrote. Is there a reliable way of detecting ...
0
votes
0answers
17 views

How do I manage multiple application instance setup/teardown via URL?

We have a heavily developed web application, with a pretty sizable team, and a lot of things going on in many branches at the same time. For our approval process, after we've done our own continuous ...
2
votes
1answer
455 views

Bash script match grep output and send message

I am developing a script for monit status checking so I can send OK status messages to NagiOS NSCA server (passive checks). The problem I am having is that my bash script still sends messages if the ...
0
votes
0answers
55 views

Trying to create a pre-revprop-change for editing message on commit

I'm trying to add a hook to svn so that you can edit messages on commits. But whatever I do I get the same error message. Revprop change blocked by pre-revprop-change hook (exit code 255) with ...
0
votes
0answers
24 views

SQL Server Express Application Deployment Via CD

Our company has an ancient home-grown Win-32 application which uses a SQL Server Express db. We have a salesperson at a remote office who has no reliable internet and I need a way to package this app ...
0
votes
1answer
58 views

Bash — Using a character-based graphical utility to store output

I'm using bash to script a remote dialing program in an Ubuntu(14.04) server and I am having some significant trouble trying to read the output from it. I would like the program to execute as I would ...
0
votes
1answer
58 views

Finding valid email service providers in a large list of domains

I have a list of approximately 13K free email/webmail providers from circa 2000. Obviously the vast majority of these services have gone out of business, and the domains have either lapsed, or been ...