1
vote
1answer
60 views

Bash: delete old files except one

I am using the following command to delete old backup files: find backups/ -name "bak_*.tbz" -mmin +4800 -exec rm -vf {} \; The problem: When there are no new files, than all files are deleted. I ...
1
vote
1answer
29 views

command to add permissions to a folder for a local user in windows server 2008

as part of an installer I need to create a user with limited permissions to add the user I will use net user "<username>" <password> /add /fullname:"<username>" I now need to ...
-1
votes
1answer
82 views

ESXi free scripting [closed]

I am trying to figure out if it is possible to script commands on the esxi system to run commands on the esxi system after the first auto start vm at a specific time after it is powered on before the ...
2
votes
1answer
64 views

Remove DVD drive from device manager - command line

Is there a way through command line to uninstall the entry under DVD/CD-ROM drives in device manager? Somehow someone applied a GPO on our top level domain and it's affected a number of things, I've ...
-3
votes
3answers
2k views

How to find files of certain extension and tar each of them in to another location

I have script for finding files of certain type and compress them to a single tar archive and put in to other place. But now, there is a change in requirement, that I need to find files of certain ...
1
vote
1answer
81 views

FOR works at prompt, but not in script file?

As part of a task that I am working on for a customer, I need to make some modifications to the enterprise logon script. Windows command-line is definitely not my area of expertise, but I am doing OK ...
2
votes
1answer
2k views

How to Extract command-line output into a Variable?

As part of a task that I am working on for a customer, I need to make some modifications to the enterprise logon script. Windows command-line is definitely not my area of expertise, but I am doing OK ...
1
vote
2answers
560 views

How can you add a command line test to Jenkins that reads the exit code?

I want to add a command line script to Jenkins as part of the build process. This command line script will exit with an error code of 0 if things where successful or 666 if it fails. I wish to stop ...
2
votes
1answer
2k views

How to retrieve the current Windows NLA network location from command-line?

We have a Windows Server 2008 R2 domain controller which always sets its NLA location to 'Network 3' after a reboot. Without fail, this defaults to Public, which screws with my Domain profile ...
0
votes
1answer
1k views

How can I run an elevated powershell script as part of VMWare Customization Specification?

Background / Goal I have a VMWare template that I am deploying and I am using VMWare's "customization specifications" to perform many of the sysprep tasks. The last thing I need to accomplish is ...
0
votes
1answer
397 views

Creating a Jenkins build farm in a hands-off manner?

My colleague and I have set up and run Jenkins on a KVM guest running Ubuntu 12.04 with good results for a while now. We are thinking about deploying a cluster of Jenkins CI hosts in master/slave ...
2
votes
2answers
4k views

how to find out the valid store names for certutil

I'm trying to find a way to script installing a certificate. Going "right-click->install certificate" works, and shows the certificate under 'subordinate certification authorities' in IE's ...
3
votes
2answers
361 views

Programmatic, script-based, or command line method to change starting program for user on Windows Server 2000/2003?

I have written an app that we want to distribute to a large number of customers to be used as the shell program when they log onto their server with a particular admin account. I have figured out how ...
2
votes
1answer
1k views

How to export User Rights Assignments and import them on another machine

How would one export all of the user rights assignments from one Windows Server 2008 box and import them on another. Neither would be on a domain so this would just be local security policy.
1
vote
0answers
456 views

Controlling rdp listener connections from command line

RPD on my windows 2003 server sometimes becomes incapable to accept connections. But netstat shows that port is listened. c:\> netstat -ano | find "3389" TCP 192.168.1.1:3389 0.0.0.0:0 ...
2
votes
1answer
69 views

Scripted printer configuration changes

I've got about a dozen Windows XP machines that I need to make a couple specific printer configuration changes to. The printer is local "virtual" printer connected to a program for an electronic ...
0
votes
1answer
102 views

bash script parameters & error trapping

I've created a bash script for a cron job that I'm using to convert an uploaded file to a couple of formats and then moving it to another folder where another cron job will store it away, etc. The ...
1
vote
2answers
2k views

Output List of User's Groups

While easy on Linux, not as easy on Windows from what I've been able to gather so far. I've found the command that kinda does what I want which is: net user username /domain However I wish to strip ...
11
votes
4answers
15k views

How can I check the build status of a Jenkins build from the command line?

In trying to make doing the right thing easy, I'm looking for and making command line tools for our developers. I'm hoping to find a way that I can check the jenkins build status without switching to ...
1
vote
1answer
102 views

Why can't I get the `for` command work in my command line [closed]

This could also be read "Why can't I get the for command work in my batch file." When I try using the command: FOR /F "tokens=1-4 delims=/ " %%a in ('something cool') DO something else cool %%a %%b ...
0
votes
1answer
91 views

Any technical reasons for avoiding GUI on 64-bit Windows Server 2008 R2?

I am new at setting up servers. I can see people reaching for console-only installations of web and SQL servers. I realize that low-quality graphics drivers and the simple fact that graphics driver ...
4
votes
2answers
4k views

Can the Linux ps command output be filtered by user AND command?

I need the pid for a process given its owner and its command. I can filter a process per user with "ps -u xxx" and its command by "ps -C yyy", but when I try "ps -u xxx -C yyy", they are combined ...
1
vote
3answers
5k views

How can I run a command window hidden or minimised?

I have written a powershell script which generates a "EULA" type popup which the user has to agree to. It does this at logon by running as a scheduled task for a user (non-admin) account. It needs to ...
0
votes
6answers
538 views

How to enter a bash script at the command line, but not process the script until the entire script has been entered

I am performing some interactive testing using HP's QuickTest Professional and Linux. I am connecting via SSH and feeding the BASH script lines directly into the command line. The problem I'm having ...
3
votes
3answers
2k views

Change Passwords for All Users on Linux Server

I've got 10 Linux servers that I need to lock down, by resetting the passwords for every single user all at once. The story behind this is long, but the general idea is that I need it to happen very ...
0
votes
6answers
417 views

Linux search in files and sub directories

right need a script/command that will list all .php files that have a pattern/string in it. It should look at the current directory and all sub directories. Be even better if it showed the line ...
1
vote
3answers
1k views

Providing command line arguments for an executable through a shell script

Suppose I have an executable xyz that takes a variable number of command-line arguments, and a wrapper Korn shell script xyz.ksh. Is there an easy way to pass all of the shell script arguments as-is ...
1
vote
6answers
341 views

Command-line virus scanner on W2k3

Hey all, I wrote a PoSH script that searches an FTP site and downloads specific zip files. In the process, I use AVG-free to run a scan on the zip files, before and after they are decompressed. Now I ...
1
vote
3answers
11k views

Error: “'net' is not recognized as an internal or external command, operable program or batch file”

Has anyone seen this error on an XP desktop machine before? 'net' is not recognized as an internal or external command, operable program or batch file. It's being used in a 'net start ...
0
votes
3answers
2k views

Need to exclude a specific result from a Batch For Loop

I have a script that recursively loads files from a specific directory (and subdirectories) into a java classpath using a FOR loop. It looks like this: FOR /r directory %%F IN (*.jar) DO call :addcp ...
2
votes
2answers
145 views

SED Find&Replace with “OR”

After a bit of googling / research on my own i haven't found a definitive answer, I'm looking to search the entire /var/www/html/ folder for occurances of "127.0.0.1" and replace them with a server ...
0
votes
4answers
17k views

Command Line Winrar & Batch Scripts

I've written a wee batch script to backup some stuff on my desktop and dump it over the network to a share... The only thing that's bugging me is the verbosity of rar.exe while it's doing the ...
78
votes
8answers
120k 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 ...
6
votes
2answers
404 views

Bash script parameters

I need to write a bash script, and would like it to parse unordered parameters of the format: scriptname --param1 <string> --param2 <string> --param3 <date> Is there a simple way ...