Questions tagged [scripting]

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

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

Scripting is usually done in a scripting language. Such scripting languages are often dynamically typed and interpreted, as opposed to compiled languages. Examples of such languages include PowerShell, Perl and Bash.

1826 questions
9
votes
3 answers

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 property for this task and we also need it to work from…
Tanel Rebane
  • 161
  • 1
  • 7
9
votes
11 answers

Batch Query Dell Service Tags

Anyone know of a way to get a bunch of information for a list of service tags, does Dell have a section on their site for this? I would also be open to any Perl / Python libraries or *nix shell scripts. Right now I mostly want some sort of date for…
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
9
votes
3 answers

Override path to binary for particular user

My question seems to be trivial but I didn't manage to find anything helpful in internet. I have a binary in /urs/bin/binary but it is outdated and newer version is available on some mount for example /mount/new_version/binary An there's a bash…
Viktor Stolbin
  • 211
  • 1
  • 2
  • 9
9
votes
4 answers

Is there a way to prevent Thumbs.db from being created, on the SERVER side?

I have some scripts running on files located on a shared drive on a Win2003 Server. I need to look at the images on any number of PC's in our network.. so every time I browse these folders, the clients create thumbs.db, which interferes with our…
steve
8
votes
1 answer

Entering local admin username and password in a script

I have alot of clients on my network and I want my script to do the following: [1] Open an elevated command prompt using the local admin details. Note: I do not want to have to enter a username and password for each user. [2] Uninstall java…
8
votes
1 answer

How can you debug a Data Input Method script in Cacti?

(See bottom for updates...) I've written a data input method script for Cacti (in Ruby, to collects stats from beanstalkd) and it works from the command line (returning a single simple integer, as documented here) when run as the cacti user account…
Teflon Ted
  • 510
  • 2
  • 7
  • 18
8
votes
4 answers

Bash: Put a job in the background and then tail the log

How do you make the escaping work so that the & is actually running the first command in the background? # foo param1 param2 >> run.out &; tail -f run.out
Paul Tarjan
  • 569
  • 3
  • 8
  • 17
8
votes
3 answers

Evaluating expressions in windows batch script

This one could turn out as the dumbest question ever, as I am probably missing out the obvious. Anyway, here it is: Can you evaluate expressions in a batch script. For example, I want to add two numbers and print the result: echo 4+2 This will just…
raoulsson
  • 4,763
  • 10
  • 34
  • 29
8
votes
3 answers

Is it possible to use Puppet to ensure multiple files in a directory are present without defining all of them?

I have a couple hundred one-off servers that have different configuration files that need to be present in a directory. Copies of the files reside on the puppet master. Within one of my classes I have a default set of configurations that are always…
Freshy
  • 81
  • 1
  • 1
  • 3
8
votes
2 answers

Using Diskpart in a PowerShell script won't allow script to reuse drive letter

I built a script that mounts (attach) a VHD using Diskpart, cleans out some system files and then unmounts (detach) it. It uses a foreach loop and is suppose to clean multiple VHD using the same drive letter. However, after the 1st VHD it fails. …
Kyle
  • 121
  • 4
8
votes
6 answers

Can the Windows telnet client be scripted?

Is it possible to use the Windows Telnet client to run a series of commands in a script? If not are there any alternatives that can be?
LachlanG
  • 183
  • 1
  • 1
  • 5
8
votes
2 answers

Error handling in Mikrotik scripts

I have RouterOS 5.14 on RB493G. I need to write script, that launches /tool fetch ... Execution of fetch may result in error, this is OK(URL may be sometimes unavailable). Script hangs on error. Is there any way to ignore…
Selivanov Pavel
  • 2,206
  • 3
  • 26
  • 48
8
votes
1 answer

If directive not working in apache VirtualHost conf, says "Invalid command"

Why?? ServerAdmin admin@mydomain.com DirectoryIndex index.php Redirect / https://www.mydomain.com:443/ ..... Save, and then…
NotGaeL
  • 277
  • 1
  • 3
  • 14
8
votes
4 answers

Is it possible to run a command on windows server from Linux?

I want to restore a sqlserver db backup on remote windows server from linux. I tired "net rpc" but there is nothing for execute a command or script on remote server.
BioLounge
  • 115
  • 1
  • 1
  • 6
8
votes
2 answers

Getting shell script to run as a daemon on CentOS?

EDIT: For some reason half of my post got truncated, not sure what happened. I will update soon and will post that it is updated here at the top. EDIT: I have updated the post again, sorry for the incomplete question. EDIT (8:55PM EST 10/10/2011):…
Lester Peabody
  • 205
  • 1
  • 2
  • 9