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
0
votes
1 answer

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

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 checking the site for errors. When this occurs, we also…
kaizen
  • 11
0
votes
4 answers

Script automation : login, enter password, run commands, save output locally?

I have had a question for a while whether it possible for a Perl or Bash script to: log into another machine enter password run a few commands save output in a local file How can I do it? Thanks for the great site!
criss
  • 153
  • 2
  • 3
  • 9
0
votes
1 answer

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 attributes currently assigned in AD. However, we…
0
votes
1 answer

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 question! On our network, we have about 15 large…
SteadH
  • 666
  • 3
  • 16
  • 33
0
votes
1 answer

Powershell script to display all groups and the users they contain

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 name -expandproperty name) $Table = @() $Record =…
Steve
  • 41
  • 2
  • 7
0
votes
0 answers

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 publish all the information it finds into a text…
0
votes
1 answer

Script to Push Files

Script to Push Files Hey Guys, Thanks for always being helpful, I have another issue that I need a little insight on how to fix. See the below script I have and the error I get. I don't understand why it does that, am I not using the continue…
0
votes
0 answers

Batch/Powershell file wont run via Task Scheduler during logoff

I'm having trouble getting my Powershell file to run from Task Schedule during logoff. In short, I'm trying to upload my NTUSER.DAT (roaming profile) to my profiles folder on the file server. Dynamic VLAN switching does not support roaming profiles…
0
votes
1 answer

Efficient way to parse Apache Access Log for CMS logins

I've been working on a way to parse large multiple access logs (sometimes in double digit GB in size) for CMSs. Right now I just need WordPress and Joomla, but I know the types will grow over time. Currently I have two oneliners (these will…
0
votes
1 answer

Check how much time has elapsed for Cron job and send email

There is a cron job that is set which runs throughout most of the day, sometimes the job gets stuck and I would like to set a time or check on it which let's me know if it has been stuck for more than 20 minutes, I wanted to get ideas on how I can…
0
votes
1 answer

Powershell cmdlet requesting optional parameters as mandatory when running as script

I am trying to use powershell to create a script which I use to add vpn connections to windows 8.1 machines. For this microsoft has made the add-vpnconnection cmdlet. When running add-vpnconnection by hand, and supplying the mandatory parameters the…
0
votes
3 answers

Script to ping all machines in the network, to find the machines that are on?

I am looking for a simple script (that can be executed in windows platform) to ping all machines, and to write the IP of "On" machines (machines that'll reply) to a text file.
amazedsaint
  • 101
  • 1
  • 2
0
votes
2 answers

For Loop in batch file

Expected Input: Start=1, End=500, Interval=100 Expected Output: 1, 100 101, 200 201, 300 301, 400 401, 500 @echo off set start=1 set end=500 set interval=100 for /L %%g in (%start%, %interval%, %end%) do ( set first=%%g set /a last=%first% -1 +…
Vinayak Dornala
  • 111
  • 1
  • 3
0
votes
1 answer

Bash Script - Expect does not send password that ends with $!. Also need improvement to report connection timed out

Update: Password issue is fixed and connection timed out message was fixed too. Adding \ before $! worked. Example: *password\$! set passwds { *password\$! @tempP@ss %Test4%} For connection timed out, added the below code after "s password:"…
ajsdg
  • 131
  • 1
  • 1
  • 6
0
votes
2 answers

Checking file properties in a batch script?

I have a batch file from a vendor to patch some software on a Vista machine. I'm going to be using GPO to push it out as a startup script. My problem is some systems require this software and some don't. I'd like to add code to the beginning of the…
MathewC
  • 6,957
  • 9
  • 39
  • 53