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
votes
0answers
11 views

How to run a function for every specific received packet? [on hold]

I am doing an experiment for my master thesis. I want to run a function (e.g. multiply two numbers) when a specific packet is received (e.g. a packet with destination TCP port 6666). For example, I ...
1
vote
1answer
30 views

Getting my server maintenance script right

I have two routine postgresql maintenance tasks that require deletion of aged rows from certain tables of my web application. Both take ~1 hr to complete, respectively. Currently, each of these ...
0
votes
1answer
4k views

Automatic alert/notification of calendar items added to Public Folders

We currently use Public Folders with Exchange 2010. We have a series of shared calendars throughout the organization. Some of the items posted require us to set up devices (video conferencing for ...
1
vote
1answer
23 views

Writing a script to find what computer a user is logged into

So I want to specify a username and return the computer name. When I run this, it tells me that my $computers obj is null. Why would $computers = Get-ADComputer | where {$_.accountdisabled -eq $false}...
0
votes
1answer
28 views

IPTABLES nat to LXD Containers

I created the following temporary rule that I enable occasionally but I would like to remove it without the need of restarting the machine. Can someone provide me the command? sudo iptables -t nat -...
0
votes
0answers
18 views

One time login/pin FTP server

I'm wondering if someone can help point me in the right direction for a feature I would like to have implemented. I'm running an amd64 Debian 3.2.73-2+deb7u2 x86_64 GNU/Linux server with PureFTPD as ...
0
votes
2answers
1k views

start-stop-daemon checking for existing running process

I'm starting a Python script that I've created using start-stop-daemon. It works perfectly in all cases, except when I've forgotten that I've already started it. It creates a new process, but is ...
-1
votes
1answer
63 views

Get AD users who have not logged in the past x Days and are member of a specific group?

I'm sorry if this looks like a duplicate. Actually the same question has been asked under http://serverfault.com/questions/783399/get-a-list-of-users-who-are-domain-admins-and-have-not-logged-in-the-...
1
vote
1answer
69 views

How to copy a file to network resources using UNC paths

I'm trying to do something pretty simple, and conceptually it should work, but it doesn't seem to, and I'm not sure why. I have a file I need to copy to multiple folders on multiple servers. I've been ...
0
votes
1answer
1k views

mail to alert when process start or stop

I have a requirement to raise alert when a particular process(suppose abc) start or stop. One of idea is to write a script that monitor process , Can you suggest any better idea. I can't install any ...
-1
votes
2answers
48 views

create folder from a list

i need to create a personal folder for each user of my company. I've tried to create a batch script using ND command and it works just with name folder without . (dot) The name of each folder ...
3
votes
1answer
57 views

How to combine properties in Powershell from multiple Objects

Many times I've needed to combine data that can only be retrieved from two separate powershell CMDLETs into a single dataset for export. I believe this should be do-able by creating a PSObject and ...
0
votes
0answers
7 views

DPM - Reporting of express backups

How can I get out of DPM server a list of the latest successful "express Backups"? ( And good to have time taken? ) The monitoring page just shows everything as a recovery point. My protection ...
1
vote
2answers
53 views

Start Process as normal user powershell

I'm creating a powershell script that does some automatic setup of new computer deployments. I'm in a situation where I want to launch an executable as a regular non-admin user from an elevated admin ...
10
votes
8answers
24k views

How do I read multiple lines from STDIN into a variable?

I've been googling this question to no avail. I'm automating a build process here at work, and all I'm trying to do is get version numbers and a tiny description of the build which may be multi-line. ...
11
votes
6answers
20k views

What command prints a string as “big ascii text art” in bash? [closed]

I'm looking for a program that turns an ASCII string into something like the "ascii art" below: .-"^`\ /`^"-. .' ___\ ...
6
votes
2answers
2k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
2
votes
6answers
4k views

How to Crypt an sh script into Linux Environnement?

I've a tinny question, how can I crypt my scripts? I mean, for exemple, sometimes I've some sh scripts (provided by some company like VMWare) and when I VI's it they just show me a crypted file and ...
0
votes
10answers
1k views

Some kind of Auto-downloader from an FTP Site? [closed]

Some company use FTP to publish the updates that we need from then, is there a software to automatize that? or i will to bash-script the process? any ideas?
2
votes
1answer
2k views

Accessing Workgroup Shared Folder from Domain

I have a domain and a workgroup. My users are supposed to upload files on regular basis to several shared folders on the workgroup. I have difficulty accessing the workgroup shared folders without ...
0
votes
1answer
2k views

Using curl with cookies

I hope someone can help me out on this one. I have been trying this for a while now, with all sorts of variations and cannot seem to get this to work. I am trying to script a way to log in to https://...
1
vote
1answer
1k views

Obtain device driver version and associated GUID using PowerShell?

Right now, I am getting two separate objects A Win32_NetworkAdapter WMI object A Win32_PnpSignedDriver WMI object In my previous scripts, I've made sure I was calling separate objects, and ...
1
vote
2answers
1k views

New-MoveRequest - How to assign -TargetDatabase dynamically

I am in progress to migrate (approximately) 5000 mail-objects and I need a way /script /command that will allow me to utilize the New-MoveRequest CMD-Let in combination with the possibility to ...
2
votes
1answer
1k 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 ...
0
votes
0answers
30 views

Systemd scripts will not run on boot

I have three docker containers that I've created systemd scripts to run at startup. I've run systemctl enable xxxx for all three services, and i've tried systemctl reenable xxxx as well. I've created ...
3
votes
3answers
4k views

Transfer files via Powershell Remoting (like scp in linux)

During the creation of a few powershell-based deployment scripts, I sorely missed an easy way to quickly transfer a file to another server (over the internet) via Powershell Remoting, something like ...
192
votes
5answers
74k views

What is the difference between double and single square brackets in bash?

I just wondered what exactly the difference between [[ $STRING != foo ]] and [ $STRING != foo ] is, apart from that the latter is posix-compliant, found in sh and the former is an extension ...
1
vote
1answer
5k views

Change Registry Value Command Line

Is there a way to set a registry value with a command line without using a .reg file to import it? I've looked over the reg and regedit.exe command line options, and it doesn't look like there's a ...
6
votes
3answers
3k views

Use GRUB/GRUB2 to PXE boot OS image

Asked this in stackoverflow but they recommended I post this here: Here is the situation I am in: I currently have a Windows drive that boots XP. The BIOS does not support PXE booting so this is out ...
-1
votes
1answer
38 views

Powershell script to take and delete snapshots

Im new to powershell and i want to create a script to take a snapshot of all the running vm's and delete the snapshots that have more than lest say 5 days. What i have is this: $Time = 5 $VMs = Get-...
1
vote
1answer
90 views

Log requests for a specific location

Have the same problem. Tried with named location, but i always get the same thing, access log created for specific location (/calendar) is empty, and logs are stored in general access log (/) in a ...
19
votes
5answers
32k views

Multi-select menu in bash script

I'm a bash newbie but I would like to create a script in which I'd like to allow the user to select multiple options from a list of options. Essentially what I would like is something similar to the ...
0
votes
1answer
624 views

How to add allowed relay IPs for Windows SMTP using command line or script

I have a long list of IP addresses I need to add as allowed relays to the built-in SMTP service on Windows Server 2008 R2 (IIS 7.5, but SMTP uses the old IIS 6.0 manager) I know how to add allowed ...
0
votes
1answer
626 views

How to reference Domain-Admins with icacls?

I need to reference the "Domain-Admins" group in a batch file. The line in question looks like this: icacls "test\folder" /grant mydomain.com\Domain-Admins:F ... and works as expected. But how do ...
-1
votes
1answer
45 views

service script for any linux dist… possible?

I'm developing an app which will be run on linux. It can run on most distributions. Is there any way to create a startup/service script that will work on any distribution? I've read about /etc/init.d ...
0
votes
1answer
206 views

Do CMD scripts run faster than BAT scripts?

I recently heard from someone that Windows Admins should use CMD logon scripts over BAT logon scripts, as the run or execute faster. Apparently BAT scripts are notoriously slow. I've done a bit of a ...
0
votes
0answers
27 views

How do I set domain machines to ignore domain in login credentials?

Basically, some machines will allow remote access with an incorrect domain but correct username and password, but others won't. How do I set a server TO do that? My issue is that I have a host ...
0
votes
0answers
66 views

Python to change password for user in JunOS device

My script is good to make device changes but the only thing im unable to do is to change the password one a particular user. Im running JunOS set system login user user authentication plain-text-...
1
vote
3answers
3k views

Powershell Win32_NetworkAdapterConfiguration Not “seeing” PPP Adapter

I am trying to get the IP of a PPP VPN network connection, but Win32_NetworkAdapterConfiguration does not seem to "see" it. If I interrogate all adapters using my script, it will see everything but ...
0
votes
0answers
16 views

How to automate tasks for non-techies like customer support?

Our Customer Support often needs small changes to our system. These are things that a dev does by running a tiny script, but that's out-of-reach for CS. I'd like to be able to make those scripts ...
-1
votes
1answer
66 views

“Ipcalc -n ipv6_addr” command is giving error

I am trying to calculate network address of Ip address by using Ipcalc command. when i am using ipcalc -n ipv4 address,then it is running fine and give the network address for the IPv4. But when i ...
107
votes
11answers
198k 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 ...
0
votes
1answer
36 views

Log all bash actions with multiple scripts

Using the command below, I can log all actions that happened inside that script. bash -x script.sh Sadly, the script calls another script, which does not have the -x setting active then, i.e. the ...
0
votes
1answer
31 views

Same script, same OS, same installation, failing

So I'm working with RANCID to monitor some switches and I'm using clogin now to test some modifications. I'm working in two different computers but both of them from the office. Althought they are ...
-1
votes
2answers
42 views

Script to delete older files and copy what is left

We have a server that runs an application that is used internally. The application has a utility that creates its own backups every 24 hours. Backups are stored in: /var/application/application-data/...
2
votes
4answers
182 views

Scheduled Task for Powershell Script

So I'm trying to run a powershell script on a schedule. Every morning at 6am, repeat every hour of the day. Here is the script itself: Get-Content C:\Users\administrator\Desktop\users.txt | ForEach-...
0
votes
0answers
11 views

MRTG Target field

Can I use OID and Shell Script in the MRTG Target field at the same time? For example Target[myrouter]: check_connection.sh&1.3.6.1.4.1.999.1:public@mydevice Please advise. Thanks
-4
votes
1answer
5k 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
vote
1answer
292 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 --log=/home/dog/...