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
1answer
20 views

How do I copy a file that has date and time in the filename [on hold]

how do I use a batch script to copy a file from one directory to another. The source filename matches the pattern: File_name1_yyyy-MM-dd-hh-mm-ss.csv The source directory has all the historical ...
7
votes
4answers
41 views

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 ...
-1
votes
0answers
10 views

cannot run aws cli through CRONTAB [closed]

im running script with aws cli command the script running fine if i run it straight, outside the CRON but if im using a CRON to run it - it is not working! any idea??
0
votes
1answer
44 views

bash script doesn't run properly in crontab but runs fine manually

I wrote a small script to determine the average IOPs per hour in which I later manually convert to a graph and spreadsheet for management to discuss a potential SAN upgrade for an upcoming expansion ...
0
votes
1answer
31 views

Script to check mobile resposive [closed]

My pc runs Linux. I have used the ET-CS script to check if a site is up or down. What I would like to know is, can this script be adapted to check if a list of sites are mobile responsive or are ...
0
votes
0answers
27 views

How to retrieve QoS data by SNMP from a Cisco router? [closed]

I want to create a gui that displays router's QoS with SNMP. I'am using GNS3 but don't know how to retrieve data from routers. Can someone tell me how to do that or give me any other ideas?
0
votes
0answers
38 views

How can I Deny permissions to logon to Remote Desktop Session Host server in powershell script?

I am need of some assistance please. I am a system admin and I am trying to create a script that will assist with the tedious tasks I have to do with disabling a user that no longer works for the ...
0
votes
0answers
13 views

Is it possible to “hook” into IIS site binding

I have IIS hosting several different versions of the same website. Right now, I access each one with a different hostname where the binding for each site has the hostname I want configured on it. I ...
0
votes
1answer
8 views

Set-SCOMMaintenanceMode EndTime Duration Clarification

Microsoft provides the Set-SCOMMaintenanceMode cmdlet in part to manage the SCOM maintenance system. A required parameter is the declaration of how long the maintenance mode should last (-EndTime). ...
1
vote
1answer
29 views

icacls variables in batch file

I'm moving users to a new domain, file server and user name format. I'm trying to write a simple DOS batch to copy the data and set the permissions. X: is mapped to the old server and E: is the local ...
1
vote
2answers
56 views

password check in bash script calling on expect

Background: I have to copy a file from one server, to over 100 servers in a test environment. once the file is copied, it requires to have the permissions on the file changed/verified. These are all ...
3
votes
1answer
57 views

How to import custom korn shell script into Nagios monitor

Our company is consolidating our monitoring solutions (WUG, Cacti, Zabbix) to Nagios. I have used Zabbix for years, and am trying to understand how to get Nagios to report on applications that I have ...
0
votes
1answer
25 views

Remote bash script execution via ssh causes local script to stop

I have a setup which behaves in a way i cannot get my head around. So I have a local bash script generateTrafficOnHosts.sh which reads IP addresses from a file. It then calls a bash script ...
0
votes
1answer
39 views

GPO Office Installation - Script runs on PC, How could I get it to appear when a user logs in?

I currently have a GPO created that installs Office 2010 for users during startup of the PC. This script is set to run for specific PCs. Is there any way that I can get the script to appear and run ...
1
vote
0answers
3 views

VBox headless: install Archlinux without RDP [migrated]

I have script to setup headless machine on remote headless server, connected by ssh. It will create machine, attaches disk and archiso, and launches installation. Also, I have script to setup ...
0
votes
0answers
15 views

Remove KACE agents using scripting tool

Is it possible to remove KACE agents using a script from the scripting menu ? If so , can someone share with us the way to do it. I found this script: AMPTools uninstall[all\all-kuid] but not sure ...
1
vote
0answers
43 views

Allow Powershell script executed on Exchange server to send mail - best practice?

I've got a single multi-role Exchange 2010 server and a need to execute a Powershell script on monthly schedule. And i really would like to send a report via email to some local company's mailbox by ...
0
votes
0answers
23 views

VBS won't execute with elevated permissions via script

I'm having an issue with running a VBS via scheduler unattended. I've been banging my head against a wall for the last week trying off and on to get this to work. I work for an MSP so we have ...
-2
votes
0answers
50 views

Syntax Error: unexpected end of file — Bash script [migrated]

I am trying to create an spritz app! Everything was working fine, but since yesterday I keep getting this error: ./spritz: line 176: syntax error: unexpected end of file I have checked the script ...
0
votes
2answers
58 views

Windows: change own password of standard user by using commandline

I want to change the password of the current logged in Windows user (no Active Directory) in a scriptable way. The users have the right to change their own passwords and already can change the ...
-1
votes
1answer
37 views

Delete files by date and character count

I have an interesting problem. I need to delete directories that are older than x days but are only numerical. We have a log folder that has log files that we need to delete but other files and ...
-2
votes
1answer
32 views

Script to open a webpage or at least hit a web api [closed]

I need to write some kind of script that runs on a windows server that can be scheduled to run throughout a day to open a webpage to a specific address or at least hit an HTTP api it doesn't ...
-1
votes
1answer
50 views

Centos running if - then command with multiple allowed values

Is there a way to run a if command in a script that can match multiple values for example I would push a script to a bunch of servers and each server would only run the command if the servers host ...
0
votes
1answer
39 views

Logrotate executes postrotate even if file not rotated

I have a problem with my rsyslog and imfile that fails when one of my log file gets truncated.. So to workaround the problem I have modified the logrotate script as follow: ...
0
votes
0answers
32 views

Powershell - Printer settings not applying

I'm currently trying to script settings for a printer connected through a local network, a normal TCP/IP-printer setup if you will. Since I'm on my phone I don't have access to the code right now, ...
1
vote
1answer
166 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 ...
-1
votes
4answers
170 views

How to test if two given files are identical?

Just updated the code... I get out everytime on the "else" sequence. You can download the update.sh file from my server. it only contains echo "Hallo update" Updated code (03.11.2015) ...
1
vote
1answer
27 views

How to get value of environment variable from passed command line parameter

I have to use/reference an environment variable value which will be passed as a command line argument. Something like below set myvar=%1 echo Value of %myvar% is %%myvar%% Here in %%myvar%% I want ...
0
votes
1answer
58 views

Trouble with embedding html email with PowerCLI/Powershell for gmail

I am new to Powershell, I am a junior admin for a VMware environment. I am trying to automate a weekly report for snapshots in PowerCli. I am making the script in Powershell. I have made a simple ...
1
vote
1answer
52 views

How to make a simple script that increases a number character by 1

I have to add a single command for MANY vlans, and wondering if I can generate a simple text file somehow? Then I can simply paste the text file into the network switch and it will add the needed ...
2
votes
1answer
99 views

How do I prevent Apache2 from trying to execute a file as a script?

So basically, I followed this guide about iptraf monitoring and rrdtool to the letter. I put it in /usr/lib/cgi-bin/ as usual for cgi scripts. Then, when I visit it from a browser, the images it makes ...
2
votes
1answer
115 views

Joining 150 computers to Active Directory

I am a junior system IT administrator. We have Windows server 2008 R2 standard and 150 computers with Windows 7 professional (32 bit). We have installed an Active Directory domain on the server and we ...
1
vote
2answers
87 views

Loop in a Windows batch file

I have a problem where I need to clone one virtual machine into several machines for production. The machines have names that is assigned by variables and a rdp port is also assigned by a variable. ...
1
vote
1answer
55 views

Puppet: How to write a proper “condition and condition” statement?

I wrote a "Message of the day" Puppet module which affects all proxy servers in my company. Within the template file, I have the following "if statement": <% if @hostname !~ /^haproxy\d+/ and ...
1
vote
2answers
110 views

How to import or export nagios host Data from command line

This might be a basic question for some of you but being a beginner i wanted to know how to export or import data of the current status(CPU, Memory, Diskspace etc) of the host from command line into a ...
0
votes
1answer
161 views

Turning off specific Icinga 2 notifications over HTTP

In Nagios Core, it is possible to turn off notifications for a specific service or host through the web interface. This is a simple web request, which we can also construct in a command line ...
1
vote
2answers
87 views

Linux: How to get a machine's IP address? [duplicate]

I'm using Linux CentOS 6.4 . I'm writing a shell script and I need to extract a machine's IP in order to use it in the script. How can I find the machine's IP? I'm looking for the "best" way because ...
0
votes
1answer
36 views

Need looping Powershell script to email me when site has error message [closed]

Running 08 windows server on a VM We need to be notified by email or by other means whenever the site is either 404 or goes to maintenance page. Therefore, we need the script to be constantly ...
0
votes
0answers
11 views

Apache2 on Ubuntu - Start external process on request?

I am using Apache2 on Ubuntu Server 14.04.01 LTS (i368). I would like to start an external process whenever a request comes in (The process started will actually get the request proxied to it.) I am ...
-7
votes
1answer
61 views

Trying to understand linux script [closed]

I have this Linux script I found and I'm trying to understand it. Could someone please help me to understand it. The script if [ ! -d "/home/ftp/$PAM_USER" ]; then /bin/su - ftp -s /bin/sh -c ...
-3
votes
1answer
68 views

bash script mysql reset pass

It seems that this code is not working I tried using it on my debian 7 machine and the password it gives me is wrong. # Please confirm that you want to reset the MySQL passwords CONFIRM="n" echo -n ...
1
vote
1answer
162 views

Configuring Pfsense via ssh

I want to know how i can completely configure and add add tables to pfsense via ssh. my goal is to have a web installer that configured multiple system and based on the output it will configure the ...
0
votes
1answer
73 views

Assigning Department based on Active Directory OU's

We have just gone to Office 365 tied in with ADFS. We want to be able to see people's departments automatically when we view their contact info in Office 365. We do not have any Department ...
0
votes
1answer
56 views

Programatically Pull Account Track Data from Konica Minolta/Ricoh Copy Machines

To be safe, I checked the serverfault guidelines, and I think this question falls under management of 3rd party platforms or administration of networks. I'm sure I'm not the only sysadmin with this ...
0
votes
1answer
169 views

Powershell script to display all groups and the users they contain [duplicate]

I'm currently trying to write a script that displays each group and user in the domain. Import-Module ActiveDirectory $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select ...
0
votes
0answers
32 views

Can I dynamically generate apache config files without using <perl> tag? Similar alternatives are an option

I am trying to find a way to dynamically generate vhost configurations when Apache starts. I am aware of mod_vhost_alias and mod_rewrite [suggested by Apache][1]. I'm afraid these won't work since ...
2
votes
1answer
129 views

How to make BSDP NetBoot image selection from a script on OS X 10.9+?

Background: BSDP is Apple's protocol used to discover and make selections on NetBoot servers on the network (Not to be confused with PC-style PXE boot). specs (Word doc). Long story short - it's a ...
3
votes
1answer
99 views

How can I have Linux execute a bash script when a specific disk is hotswapped in?

I have a set of hard drives which are rotated for offsite backup. There are several steps that need to be performed when one of the disks is reinserted which I've rolled into a simple bash script. ...
1
vote
2answers
88 views

Linux: How to allow a regular user to “su - anotherUser”?

I wrote a Nagios check script which checks if user peeradmin is able to touch a file in some mount on the server. Nagios user is: nagios . I've edited /etc/sudoers and added these lines but none ...
0
votes
0answers
33 views

Collecting PC to Printer relationship information across an entire domain using a script

I'm trying to create a script which will enable view every PC to Printer relationship across an entire domain of around 1200 machines. In theory I am looking for a script to be run so that it will ...