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)

-2
votes
1answer
36 views

Linux check availability [on hold]

How can I do an infinite ping to a server, and when the server is down put the server IP in the server where i'm running the program? Is it possble with a while?
0
votes
0answers
5 views

Maintain and version controll config- and SQL scripts

I'm looking for recomandations of handling variouse config scripts for a few databaseservers. The scrips fall into the following categories: OS Config scripts and files, such as crontab for multiple ...
0
votes
1answer
14 views

Cron: Execute python script, capture stdout & stderr and send via msmtp [duplicate]

I try this for almost 4 hours now, in different ways. I googled a lot, but nothing I try work as expected. I have a simple .msmtprpc file, that allows me to send mails like this: echo -e "Subject: ...
0
votes
0answers
8 views

NAUbackup - Xenserver 6.5 Backup Solutions

Has anybody every successfully used NAUBackups for xenserver 6.5 and had their backups go to a SAN storage repository? I see the default script backs up to an NFS share but I am trying to avoid NFS ...
3
votes
0answers
41 views

Robocopy from one to many

I am trying to use robocopy to update some internal AV clients that are not working. They will update once I the files are copied manually in. I've tried the following robocopy script, but can't get ...
5
votes
1answer
36 views

How to get SCCM to recognize return codes from Powershell script completion?

I'm using an SCCM 2012 application deployment to install software. The specific install type is scripted installer as SCCM kept failing for exe validation errors. The script is powershell and ...
1
vote
1answer
48 views

Automating user password creation and User privileges restriction in solaris 8

I have couple of questions. Here is the first one We are trying to automate the creation of a user in solaris 8. We provide a default password and then force the user to change the password at first ...
0
votes
0answers
30 views

Using a .PAC file for switching proxies

My question is similar to this one: I need to connect to distinct proxies depending on whether I attempt to visit internal or external sites using my organization's network. No .PAC files have been ...
0
votes
0answers
22 views

LDAP NET-IQ DRA (Active Directory) Group member of does not work

I am trying to list a couple computers, that do not have a specific group membership. This is what I have at the moment: ...
-1
votes
1answer
30 views

CentOS 6 script at server boot up

I have three terminal commands that I would like to execute when server boots up. How can I achieve this? I have seen many solutions, but none of them seems to be simple and working. Here are the ...
0
votes
1answer
27 views

iptables-save syntax

My goal is to automate my iptables config, so while analyzing my current iptables rules setup on my local box for reference I get the following when using iptables-save > ./iptables.save; cat ...
2
votes
2answers
45 views

PowerShell to remotely invoke Exchange with other credentials

I've been tasked with creating a script that is going to be run on multiple user machines throughout the network. The commands that we're ultimately going to have run will change the user's email ...
3
votes
2answers
81 views

Can't Get PSExec to work with Powershell

Last week I developed a script that would check if psremoting was enabled on specified machines. This week I began working on a script that would enable psremoting on specified machines but I can't ...
0
votes
2answers
54 views

Accept Value From Pipeline Powershell Function

I would like to create a script that tell the user whether or not PSRemoting is enabled on multiple remote machines. Here is what I have so far: function Test-PSRemoting { Param( ...
0
votes
0answers
3 views

Identifying cached JNLP applications via batch script

I am attempting to script a solution to install JRE 7 only to systems that run a particular JavaWS application. Essentially the current application requires Java 6 and the upgrade will break ...
0
votes
0answers
13 views

Script to automate command in PowerBroker

I'm trying to script my commands that are run inside the pbrun shell. I've tried executing through a normal script, but that doesn't work because, to my understanding, pbrun is executed in its won ...
1
vote
1answer
45 views

How to cast as ArrayList AND preset data in param block?

As I need to be able to add and remove items from an array I need to cast it as an ArrayList as opposed to the more common options ([string[]], [Array], $Var=@()). I also need to preset it with data, ...
0
votes
0answers
24 views

bash scripting and comparing 2 directories - Beginner [duplicate]

My problem is that i have to check what files are included in the $directory, then i have to make a new file with name specified by me and compare if the name doesn't already exist in this directory ( ...
0
votes
1answer
8 views

Puppet case statements with integer range

I need to write a case using some ranges in order to write in a better way something like the following spaghetti code : if $mem < 1024 { $retvalue = "128M" } elsif $mem < 7000 { ...
0
votes
1answer
36 views

cron and lftp issue

I have the following scripts running on raspbian. start #!/bin/bash /root/config/commands 2>&1 > /root/log/$HOSTNAME.log commands #!/bin/bash source /root/config/variables echo TestLine ...
0
votes
1answer
38 views

Copy-item with multiple filter

How can I use copy with multiple filter values? For example, it works if I specify only 1 value to filter (*.jpg) Copy-Item -Path Y:\TEST -Recurse -Filter *.jpg -Destination ...
0
votes
1answer
39 views

Dynamic timezone change for OpenWrt (Chaos Calmer), NTP

I have this idea for my routers running OpenWrt, since for them there is no way of knowing in what time zone they are by default. What if there was a list of lets say three time servers each per one ...
1
vote
1answer
36 views

Kickstart not working

I'm trying to create a kickstart to automate the installation procedure but when the installation ends and I check to see the result nothing happened. I'm trying to debug it by putting read statements ...
0
votes
0answers
10 views

shell script for checking the list of websites status [duplicate]

How can i write a shell script for Checking the list of websites in a server which are running up or not. If they are running leave it. Those who are not running what type of error it is popping out ...
0
votes
0answers
15 views

Script to propagate root folder inheritance to sub folders every X minutes?

Is there a batch script that I can run every 15 minutes (assuming task scheduler) that will propagate inheritable permissions to every sub folder from the root folder? A little background on why I ...
2
votes
3answers
84 views

PSExec shutdown list of servers

I have a system I inherited that used a simple psexec script and a list of servers to automatically shut down the servers in the list should a temperature threshold be reached or the UPS only has a ...
0
votes
1answer
86 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 ...
2
votes
1answer
37 views

How to properly deploy internal self-signed scripts (Powershell)

Completely new to certificate usage so be gentle. I'd like to deploy Powershell scripts that I made to other employee computers so they can use them, but I will need to sign them in order for them to ...
0
votes
2answers
111 views

#!/usr/bin/expect not working

This is probably an easy question, however have a simple expect script that I've add the executable bit to that seems to be ignoring the #!/usr/bin/expect interpreter line. Further more, it also ...
1
vote
2answers
45 views

Bash script rsync --include-from fail

I have writted a bash script to backup folders and files from a machine to our backup server. My goal is to exclude all the files older than 6 months from this weekly backup. To do that, I used a find ...
0
votes
1answer
90 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 ...
1
vote
1answer
526 views

Retrieve SCCM collection membership via PowerShell

I'd like to find a PowerShell script that retrieve the SCCM collections for a given computer or user. I know this can be achieve via a SCCM query, but I'd like to do this using a PowerShell function. ...
1
vote
2answers
171 views

Retrieve internet proxy server address via PowerShell

I have to retrieve the proxy server address and port via PowerShell, so I can use the Invoke-Webrequest -uri http://some-site.com -Proxy command. The expected output should looks like ...
-5
votes
2answers
48 views

Why isnt this sudoer command run as root? [closed]

I want to give PHP access to a very specific script using a configuration under /etc/sudoers.d. So I did the following: visudo -f /etc/sudoers.d/99-php And entered this sudo rule: www-data ALL = ...
8
votes
3answers
332 views

PowerShell: Get-ADUser Properties with åäö

I'm trying to extract select sets of users with Get-ADUser. The users belong to companies whose names include non-ASCII characters, e.g. "Gåäördet". Unfortunately, we do have to use the company ...
-1
votes
2answers
96 views

how to extract mysql version by bash script in centos 6

I need to extract the mysql version in a bash script on CentOS 6 for a minimum requirements check Example: # mysql -V mysql Ver 14.14 Distrib 5.5.43, for Linux (x86_64) using readline 5.1 # mysql ...
0
votes
2answers
56 views

iptables blocking script using arp table lookup

I need to block certain hosts (multi-OS) on our LAN from gaining internet access. I decided to try and block certain hosts by mac address via iptables but I can't use the mac address of the ...
0
votes
1answer
40 views

Logging into file doesn't write anything

I have got some script, which I want run after start computer. I set it in group policy and script is running after PC start (I checked it), but I have in script some logging to which doesn't work. I ...
12
votes
4answers
221 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 ...
0
votes
1answer
64 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
0answers
122 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
20 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
76 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
2answers
310 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
417 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
115 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
116 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
0answers
78 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 ...
0
votes
0answers
44 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
125 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 ...