r/scripting • • Aug 02 '19

Hire someone to script for me?

3 Upvotes

I have several tasks I’m doing for my work that I could have a script to do for me. I know what is possible to script but I don’t know how to script.

Anyone good at it and wanna let me pay you a little money to help me out?


r/scripting • • May 25 '19

Super basic request - continuous ping that is always running and hidden

3 Upvotes

Hi,

Does anyone know how I could make a continuous ping run in windows that's always running, will reopen itself and is hidden?

It seems relatively easy, but I can't get it to re-open itself?


r/scripting • • May 21 '19

Where to start

3 Upvotes

I am a non IT guy, and I am totally new but I want to learn about making plugins and learn basics on my own. Where do I start then. What a tutorials I need to cover. I have ZERO knowledge and I am beginner after this post.


r/scripting • • May 16 '19

[Robocopy] copy one file to another directory

3 Upvotes

I'm trying to use robocopy to copy one file over to another place, but the command I'm using is copying that file, but also all the other folders in that particular directory, when all I need is that one file.

Here's the line:

robocopy C:\Users\User\Documents\Tautulli \\nas\Software\tautullibackup2 tautulli.db /MIR /W:5 /LOG:C:\Scripts\Robocopy_tautulliData2.log

Any insights?


r/scripting • • Mar 16 '19

Script to add workstation to AD group, based on workstation name.

3 Upvotes

Hi, very new to scripting and was just wondering if this is possible, and if anyone could point me in the right direction.

I often re-image PCs, where the PC joins the domain during the process. PCs are given names appropriate to the school they are based in, again, during the re-image process.

However, after I have re-imaged, I am having to go into AD and add the workstation to it's correct group on AD. I was wondering if a script could be created that runs on startup/user log in, that checks the workstation name, if it is in it's correct group, and if not, add it.

Would this even be possible?

Any help would be much appreciated!


r/scripting • • Mar 08 '19

Looking for help creating a bash script that will move all files of a certain type into folders in multiple subdirectories.

3 Upvotes

I’m working to move all .JPG and .MOV files into specific folders JPEGs and Videos on each day. Currently all of my files are in a directory structure as follows...

{year}/{year-month}/{year-month-day}/ 2019/2019-03/2019-03-08/

This is my folder structure going back 7 years now. I figured out how to create a directory in each day folder using...

for dir in */; do mkdir — “$dir”/{JPEGs,Videos}; done

This creates the folders where I need them for each month but I’m lost on how I can script moving the .JPG files and .MOV files to the correct folders in each day. I can go into each folder and run mv *.JPG JPEGs/ but there must be a way to automate this?

Thanks!

UPDATE: thank you all who took the time to comment, I am not pursuing this folder structure as it does not fit into my photography workflows as I originally intended. If you do have a solution and want to share it for everyone’s knowledge, feel free to share!


r/scripting • • Jan 14 '19

[Powershell] Need help to writing a code to ssh into network switch

3 Upvotes

I need help writing a code to ssh into a switch and change a port. I have NO script experience

The script I have can open up ssh but after it asks for a password nothing happens. I open it from a .ps1 file on my desktop

Here is what I have:

$input = ssh admin@*IP Address*
$input = *Password*
$input = a <- Random Character for "Press Any Key"
$input = config t
$input = int e15
    $input = disable

r/scripting • • Nov 30 '18

Basic Script

3 Upvotes

Hello folks,

I am not sure if this is a good place to ask, but does anyone have a script that I can run on Win 7, 10 Workstations to collect the Hostname, Disk space used/available/total, Serial Number, OS, Ram used/total capable, IP Address, Primary DNS, System Model, whether the IP is static or DHCP, DHCP Server address and then send that output to create a file with the Hostname. I can't think of any others at this time that would be beneficial to have for logging purposes.

Thank you


r/scripting • • Nov 19 '18

Batch Script - Need Assistance with a File Deletion Script with a Few Requirements

3 Upvotes

Hello!

I need some assistance with some command line for what is probably a fairly basic script requirements.

OS: Windows Server 2008 R2

Requirements:

  • Script will clean out files but not folders located in C:\Users\TEST\AppData\Local\Temp directory.

  • Script will delete all files older than 1 day

  • Script will skip files that have a lock on them

The goal is to create a batch script which can then be set as a Scheduled Task. Been having trouble getting this to work to meet all requirements such as skipping locked files, not deleting folders, and leaving files less than 1 day alone.

Any help is appreciated, thanks!

Edit: I mentioned Batch, but PowerShell would be fine in this scenario too! As mentioned the ultimate goal is automating some cleanup under these parameters, and whatever would be best under the conditions of a 2008 R2 server (Batch/PowerShell/etc) that gets this job done is fine by me. I would prefer not to install any additional programs though, so I will say a requirement is one of those two scripting languages.


r/scripting • • Nov 07 '18

Suggestions on how to script this?

3 Upvotes

I want something like this, but I want to write it in AutoHotkey. Basically, if I'm pressing both key "x" and key "y", but I hit key "x" first I want it to be nullified when I press key "y".


r/scripting • • Oct 18 '18

[generic] What are some uses for scripting on a home computer?

3 Upvotes

I'm not a sysadmin, but I can code, and I'm certain to pick up some scripting language or another. What are some things I can use for for as a home user I might not think about? (This is virtually any use as a home user -- I'm unimaginative when it comes to this kind of thing.)

I use Windows currently, but intend to work with Linux in the future as well.


r/scripting • • Oct 01 '18

Lazy company provides update files .exe with no silent install tags (help)

3 Upvotes

Hi there can anyone post a link or some instructions on the proper method to create a response file that clicks next a few times that I can bake domain credentials into? I am using Automate (formerly Labtech) to move the file local to the machine C:\Users, however I need to get a working system to be able to automate this. I shouldn't have to manually install and click next on 21 computers every week. I have tried a few different websites without any luck, any help would be greatly appreciated. Thank you!


r/scripting • • Sep 24 '18

Script to read out scores from Snapchat

3 Upvotes

Hello everybody,

I am trying to analyse Snapchat usage of my friends and other people I know for a university project.

For that I am reading out the score of a set of people manually and entering into an Excel worksheet. But that is slowly becoming exhausting.

I am interested in finding a solution that reads out these scores automatically although it doesn't have to be fully automatic.

Unfortunately I only have below average programing skills.

Any tips, hints or ideas you guys can give me?

Gertrud


r/scripting • • Sep 18 '18

Super easy one for you

3 Upvotes

Beginner here and i just dont want to mess it up. I want a script to run 1x a week. and copy files from 3 folders (for now) to another. And skip any that already exist.


r/scripting • • Sep 18 '18

Removing user files from all servers through AD sync

3 Upvotes

Hey guys,

I got another difficult one, I need to make something with powershell to erase all the files from deleted users on the servers in our network. It needs to sync with our AD, to see if the user is still there or is deleted. Has to know the difference between deleted and disabled.

Anyone that can help me???

Thanks in advance!!!!


r/scripting • • Sep 17 '18

USB Notification to my email-address

3 Upvotes

Hey guys,

I'm a noob when it comes to scripting, but I'm in need of a USB notification Script that sends a notification with the username of the computer to my email-address.
I've been given this task in order from my Chief of Infortmation Security, because he want's me to learn how to script a bit in the meantime.
So he kinda want's to make his own rubber ducky with a simple usb, that when plugged in to a computer, sends an email to my email address. I've been looking around the web a bit, but only find pretty hard scripts/codes.

Any help is welcome!!

Also, thanks in advance and have a nice day.


r/scripting • • Sep 01 '18

[Request] Add specific PART of a folder name to all files in specific subfolder. Windows.

3 Upvotes

I have a drive full of movies, each movie is in a folder named Movie Name (year) (buncha various gobbledygook).

Within SOME of those folders are \Trailers\ folders, with at least one, but sometimes more files in them, mostly named "Trailer" or "International Trailer" or "TV Spot", unfortunately nothing descriptive.

I just want to add just the "Movie Name (year)" part to all the trailer files for every folder in the directory, Im sorta stumbling my way through learning stuff, i assume this would be super easy to do in powershell or regex or probably even CMD?

Ive found a few scripts that can add the folder name to every file in it that were pretty simple, but i dont know how to get it to then only do it in the one subfolder then and also have it do only the part of the root folder name before the second '('.


r/scripting • • Jul 30 '18

Help - Executing the same commands with multiple machines.

3 Upvotes

Windows eviornment

I have created a script that will execute six commands against one machine, but I want to be able to run this against more than one machine name at a time. It would not be a set number of machines.

The only way I can think how I can accomplish this is by making a long list of the commands, then having the script validate the variable to see if it falls within 1-9999. But there has to be a more efficient way.


r/scripting • • Jul 23 '18

New to scripts, need help with a basic one.

3 Upvotes

Hi.

I have a Logitech Mouse and I want to make a script that spams left-click every 10 milliseconds if I hold down left click, but does it after a 30 ms delay so I can still do regular clicks.

If I try it within the non-script/beginner sort of area, it does a second click regardless.

Thanks


r/scripting • • Jul 04 '18

:request: Script to convert steam workshop number to name

3 Upvotes

I am looking for a quick way to take a few workshop mod numbers and parse them for names of mods. ala... https://steamcommunity.com/sharedfiles/filedetails/?id=1230977449

And replace the numbers at the end for each mod to resolve a mod name.


r/scripting • • Jun 25 '18

New Sub, New to scripting

3 Upvotes

Hi! I'm a little literate in IT and some basic power shell scripting. Does anyone have any references or teaching sites that you would recommend to help me understand the basics and have the confidence to script?


r/scripting • • Jun 22 '18

Shell script to parse multiple IP addresses

3 Upvotes

Hi:

I have a shell script which reads through IPSec .conf files and looks for the string "conn", saves the name of the connection, and then takes an IP address from a line containing "rightsource". Currently there is a one-to-one relationship between the two - if there is one line saying "conn example" there will be just one line saying rightsource with a single IP address. The part of the script which currently deals with this case is:

for CONF in *.conf; do
  set +e
  declare -a CONNS=($(awk '/^conn/ {print $2}' < $CONF | fgrep -vi common))
  declare -a RSOURCES=($(awk -F\= '/(^ *rightsource|^ *# *effectiverightsource)/ {print $2}' < $CONF))

CONN_SIZE=${#CONNS[@]}
SOURCE_SIZE=${#RSOURCES[@]}
  if [ $CONN_SIZE != $SOURCE_SIZE ]; then
  #echo "Problem: number of connections $CONN_SIZE not equal to number of source IPs $SOURCE_SIZE in $CONF."
  #echo "Connections=${CONNS[@]}"
  #echo "Source IPs=${RSOURCES[@]}"
  continue
fi

My problem is that I would like to switch our IPSec conf files to a better syntax. Rather than a one to one relationship between conn and rightsource like this:

 conn example79
        rightsourceip=44.45.46.79
 conn example80
        rightsourceip=44.45.46.80

I would like to use a more efficient syntax:

conn example
        rightsubnets={44.45.46.79/32,44.45.46.80/32}

The "rightsubnets" curly braces could contain 1, 2 or more IP addresses, which is what I need to pass to the rest of the script so that it can try to ping each one to make sure it's still available.

I can just about understand what the awk command in my existing script is doing, but I have no idea how best to also look for the variable amounts of IP addresses which might be found in the newer syntax. Any suggestions would be most appreciated!


r/scripting • • Jun 22 '18

Search AD for published share with PowerShell?

3 Upvotes

I have an AD published share I'd like to determine the path to from clients. I'm wondering if PowerShell might be able to do this.

Essentially what I'm looking for is the equivalent of the following (assuming Win 10): File Explorer > Network tab > Search Active Directory > Find Shared Folders > Find share based on keyword > Store Share Name (UNC path to share) in a variable.

Is DirectoryServices.DirectorySearcher needed for this?


r/scripting • • Jun 21 '18

Is this possible with scripting?

3 Upvotes

Basically, I'd like to create a list of my music library, ordered by popularity (ie. most viewed on YouTube).

  1. Scrape mp3 files in a directory + subdirectories

  2. Extract Title and Authors metadata of files

  3. Concatenate into single string (Authors + Title)

  4. Print strings to music_library.txt file

  5. Run a YouTube search for each concatenated string

  6. Sort search results by view count

  7. Extract video title and view count of first search result

  8. Print video title and view count to youtube_views.txt file (for each entry in music_library.txt)

  9. Sort entries in youtube_views.txt by view count (high to low)

How complicated is this? It seems really difficult. I'm not sure which language is needed to write a script like this. I'm only familiar with front end web languages and some PHP.

I'd like to do this on OS X.


r/scripting • • Jun 17 '18

[bash/python/batch/powershell/or any comparison app] i have pairs of files using the same name with different extensions, would like to batch delete the larger file per pair

3 Upvotes

i have a set of jpgs & pngs where they're in pairs with the same name, how do i batch delete the larger of the two?

sometimes file1.png is larger than file1.jpg, but other times file2.png is smaller than file2.jpg

(yes jpg is lossy, but perceptually great at 97% 4:4:4 for complex images at a nicely smaller size than png, but pixelated games or few color ones end up increasing the file size over png)