r/ScriptSwap • • Jul 01 '15

Ping remote computer to excel

5 Upvotes

Hey gang,

Does anyone happen to have a .bat script that will ping list of computers by name or ip, and if it is successful output to an excel file? I used to have one a couple of years ago, but can't seem to find it at the moment.

So, if I have a .txt file save to root C named "computers", I would like the .bat to ping each computer on that list, and if it is on the network export it to an excel document. Just didn't want to re-create the wheel if someone already has something.

Thanks

Found one that I was using, but it does generate an error. One of my co-workers created it several years ago, so I can't take credit for the code and am not exactly sure which co-worker created it.

[Ping to Excel] (https://github.com/Shazam1269/PingToExcel/tree/master)


r/ScriptSwap • • May 15 '15

[Request] An alias that can redirect program output to /dev/null

5 Upvotes

So I often append &>/dev/null when running a program from the terminal as I find the messages annoying, and I tried

alias quetly='&>/dev/null' 

Then when i ran 'guake quietly' it gave me all the messages. I think there's just something about aliases that I'm just too new to understand. Is there a a way for me to be able to run

quietly guake 

or

guake quietly 

and not get the messages?

This should be quite easy for someone with a little more experience than me.


r/ScriptSwap • • Apr 24 '15

Flexible Firewall script (yet another?)

5 Upvotes

Yeah, I know, how many firewall scripts do we need?

I'm not even really sure why I started hacking this together. I think somebody was asking me what I use for a basic firewall, and I started putting the pieces together, then looking at other things on the internet, going back and forth, and then suddenly I had something that i thought I could make useful.

So, the basic premise of this script is that it -should- be able to be used on either endpoints or on a router/gw device without much change.

Oh, yeah, and it supports IPv4 and IPv6 as transparently as possible.

It's written in bash, because yet again I hate myself and use the simplest tools for the complex things.

https://github.com/akhepcat/FlexibleFirewall

It's just barely working, I think, so if you like beating things up and giving bug-reports or feedback, now's your chance!


r/ScriptSwap • • Apr 19 '15

[Request] A script that will mail me (or message via FB) my external IP when it changes or every few hours.

5 Upvotes

Hello, I have Windows 7 and a dynamic IP and I'm running a Minecraft server on my computer and I'll be out of town for a few days and I want to keep my server running. My IP might change and I want to keep track of it in some way.


r/ScriptSwap • • Apr 10 '15

[Request] Script to scan all folders for specific file type, and delete any folders WITHOUT said file type

5 Upvotes

Running Windows 8.1. I have a bunch of folders that should all contain .mobi, .epub, and .pdf files, but for some reason many of these folders do not contain the actual book files. I'd like to clean up these useless folders so they stop clogging my database, but going through all 6700 folders one by one is not exactly practical. Thank you!

Edit 2015-06-26, ended up doing it manually, request closed, thanks for any responses and effort put in regardless.


r/ScriptSwap • • Mar 21 '15

[javascript] subreddit comments in realtime!

5 Upvotes

figured i would share this. Done using jquery. Can be used to monitor subreddit comments in real time. I built it for moderation on one of my subreddits.

this is the script

I included the entire thing, but obviously you can strip it down to bare javascript if that is what you prefer. Jquery is required. Currently it will look at /r/all and pull the comments from that, but you can replace /r/all in the following line with whatever you want!

 $.getJSON("http://www.reddit.com/r/all/comments.json?limit=1",function(data){

It does have some limitations and could be hugely improved. one limitation is it will not parse markdown. Also storing things in an array and comparing it is a very dirty way to do this, but it was the quickest i could figure out D:

hope its helpful to someone!

edit: if you want to see a demo of it in action, look here: http://distortednetworks.com/commentdemo.html


r/ScriptSwap • • Dec 17 '14

[sh] Copy text from a pipe onto your clipboard. Works in any xterm-compliant terminal, even when ssh'd into a server

5 Upvotes
echo -en "\x1b]52;c;$(base64 -w0)\x07"

As a script: https://gist.github.com/Lucretiel/71f768cac99ffac3b9e0

Pipe anything- files, text, whatever- into that to have it copied to the terminal's clipboard, if supported. You'll want to put it in a shell script, rather than an alias or function, to ensure that the inner base64 gets stdin correctly. This works for my even when on machines I'm plain ssh'd into, without any X forwarding; your milage may vary. Based on https://github.com/macton/hterm#does-hterm-support-the-osc-52-aka-clipboard-operations-sequence.


r/ScriptSwap • • Dec 02 '14

[bash] Plot ping responses with Gnuplot

5 Upvotes

The ping tool doesn't allow you to visualize patterns easily. Also, you have to exit the tool to get some idea of the overall picture. This is an attempt to help with that.

Caveats:

  • Dropped packets are handled in terms of the difference of the preceding and the following packets' icmp sequence being >1. Unfortunately, I don't know how to do this any better with Linux's ping.

  • If you want to plot your data in realtime, press "e" inside the gnuplot window the script opens. There is a way to get the script to do this automatically, but that involves using the x11 terminal. Haven't gone there because ugliness.

  • The tics on the time axis are set to 10 seconds (Line 74). You probably want to change that to a number more suitable for extended monitoring OR delete the line to allow the axis to autoscale.

Here's the script: http://pastebin.com/Sn2rBJhw

P.s. I'm still pretty new to this stuff so please suggest anything you can that goes towards improving this.


r/ScriptSwap • • Jun 07 '14

[sh] Clementine now playing script

5 Upvotes

https://github.com/makos/clementine-np

#!/usr/bin/sh
# prints now playing from Clementine
# to use with irssi, do:
# /alias np exec - -out /path/to/script
# then /np to print in current window
# add -n option to display only $artist and $track without $album (useful for statusbar display
# so it doesn't take too much space

artist="$(qdbus-qt4 org.mpris.clementine /Player GetMetadata | grep artist | sed 's/artist: //')"
track="$(qdbus-qt4 org.mpris.clementine /Player GetMetadata | grep title | sed 's/title: //')"
album="$(qdbus-qt4 org.mpris.clementine /Player GetMetadata | grep album | sed 's/album: //')"

while getopts ":n" opt; do
    case $opt in
        n)
            echo 'np: '$artist '-' $track
            exit 0
            ;;
        \?)
            echo 'Usage: np [-n]'
            exit 0
            ;;
    esac
done
echo 'np: '$artist '-' $track '('$album')'

I was surprised there are no np scripts for Clementine. This script also works with custom statusbars, like in i3, dwm, (probably) dzen2, and other IRC clients that support executing scripts from shell.


r/ScriptSwap • • May 23 '14

[python] Reverse-search each image of a website

5 Upvotes

This is a simple python script to parse the url of every image from a webpage and then reverse-search each of them using google.

I use it on my blog to check if my photos appear on other websites.

To use it you'll need:

It works as following:

  1. a new window should open and load the webpage

  2. another window should open which will display the search results

  3. a tkinter window opens and display the number of images; pressing the enter key searches the next image, which is displayed in the 2nd window

  4. at this point, the user has the possibility to navigate on the second window to see more details about the search results, and may come back to the tkinter window and press enter to continue.

Tested and working on Windows 8.1 with Chrome (if you want to use another browser you'll need to change the script accordingly).

Feel free to use it (and improve it)!


import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from Tkinter import *

#Webpage to parse
page="http://touste.tumblr.com"

#First browser to open and parse webpage
browser = webdriver.Chrome()#may be changed to use Firefox
browser.get(page)
time.sleep(1)


#Scroll until all the images have been found (useful for infinte scroll pages) 
prev_numb = 0
post_elems = browser.find_elements_by_tag_name("img")

while len(post_elems)>prev_numb:
    prev_numb=len(post_elems)
    browser.execute_script("window.scrollTo(0, document.body.scrollHeight);")
    time.sleep(0.5)
    post_elems = browser.find_elements_by_tag_name("img")
    
#Second browser to reverse search the images
browser2 = webdriver.Chrome()#may be changed to use Firefox

#Window that captures keypress and display image counter
root = Tk()
prompt = StringVar()
prompt.set("Press Enter to go to next image (image 0 of " + str(len(post_elems)+1) + ")")
label1 = Label(root, textvariable=prompt, width=50,bg="yellow")

#Reverse search each image and update the window
k=0
def gotonext(event):
    global k
    global post_elems
    prompt.set("Press Enter to go to next image (image " + str(k+1) +" of " + str(len(post_elems)+1) + ")")
    root.update_idletasks()
    if k<len(post_elems):
        post = post_elems[k]
        k=k+1
        url = "http://images.google.com/searchbyimage?site=search&image_url=" + post.get_attribute("src")
        browser2.get(url)

#Execute previous function each time Enter is pressed
label1.bind('<Return>', gotonext)
label1.focus_set()
label1.pack()
root.mainloop()

Edit: /u/shidarin cleaned up the script and uploaded it on github: https://github.com/shidarin/photosleuth

Many thanks to him!


r/ScriptSwap • • Dec 25 '12

[Request] Change Domain-joined Windows PC name using batch

5 Upvotes

Does anyone know if I can rename Windows PCs using batch in a domain environment? I am successful in writing to the registry values below, but the changes are not reflected in AD or DNS (windows server 2003), but echoing %computername% on the machine looks correct. Can still log in to domain after making these changes. The answer may be to do this manually, but I'm looking to do this to over 150 machines... really hoping for some automation.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\ComputerName\ComputerName] /v "ComputerName"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters] /v "NV Hostname"


r/ScriptSwap • • Nov 17 '12

nextport - Find the next available TCP port (GPL2)

5 Upvotes

I do a lot of host proxying using VNC and ssh, both at home and at work. So do a number of other folks around the office, and when we're all logged onto the main bastion host, using our cheater-scripts to perform those jumps would step on each others toes if they were using a hard-coded listener-port.

So, I came up with this side script for our linux hosts to use that will find the next available port for use as the local ssh/vnc/rdp listener.

I chose the /proc/net/tcp route because lsof isn't always installed, and even if it is, won't give up all ports to non-root users. netstat wasn't consistent enough either.

Enjoy!

#!/usr/bin/env bash
# GPL2, (c) 2010 Leif Sawyer
PROG="${0##*/}"
INCR=0

ARG=$1
if [ "${ARG}" = "-h" -o "${ARG}" = "--help" ]
then
        echo "${PROG} [start-port]   - defaults to 5900"
        exit 1
else
        #Only allow digits
        ARG=${ARG//[!0-9]/}
fi
BASE=${ARG:-5900}

while true
do
        PORT=$((BASE + INCR))

        ACT1=$(lsof -i -n -P | grep -E ":${PORT} " | cut -f 2 -d: | cut -f 1 -d- )
        ACT2=$(for i in $(awk '{print $2}' /proc/net/tcp | cut -f 2 -d: ); do perl -e "print hex \"$i\",\"\\n\";"; done | grep ^${PORT})

        if [ -z "${ACT1}" -a -z "${ACT2}" ]
        then
                echo "${PORT}"
                exit 1
        fi

        INCR=$((INCR + 1))
done

r/ScriptSwap • • Nov 11 '12

[bash] Image viewer for virtual terminals/xterm

5 Upvotes

Requires: w3m, w3m-img

Since fbi and zgv require root to view images, I was annoyed I needed a password to view images. Then I realised that w3wn can display images without root, but you can't invoke w3m with an image, so I made a script to put the image in a custom HTML file and load it from that. Enjoy!

http://pastebin.com/v85TFkhq


r/ScriptSwap • • Oct 27 '12

[Bash] Get info about elements by name, symbol or atomic no.

5 Upvotes

Pretty basic. Relies on curl.

http://pastebin.com/3Pqbz11e

Place in your PATH and call it element.

USAGE:

element <element name>
element -n <atomic number>
element -s <symbol>

Sample output is here.


r/ScriptSwap • • May 07 '12

kwtracker.sh - track karmawhores.net stats

5 Upvotes

I got bored today so I wrote a simple bash script to track karmawhores.net stats.

http://pastebin.com/szvRkAxJ

#./kwtracker.sh binaryechoes
# tail -1 /tmp/kwtracker.log 
2012-05-06 17:32:50 ./kwtracker.sh[31774]: dumping stats for binaryechoes. Comment Karma = 1278|Link Karma = 1070|Combined Karma = 2348|Comment Rank = 6544|Link Rank = 3849|Combined Rank = 6333|

r/ScriptSwap • • Mar 30 '12

[sh] Sprunge.us uploader NSFW

5 Upvotes

channeller receiving expired angled phenyl


r/ScriptSwap • • Mar 28 '12

How I'm going to win 5 x 10^8 dollars

5 Upvotes

!/usr/bin/perl

use strict; use warnings;

main();

sub main { my @tickets;

for( 1..5 ) {
    print "seed = ";
    my $line = <>;
    chomp $line;

    if( $line ) {
        my $num = time ^ $$;
        for( split(//, $line) ) { $num ^= ord };
        srand $num;
    } else {
        srand( time ^ $$ ^ unpack "%L*", `ps axww | gzip -f`);
    }

    push @tickets, pick_numbers();
}

for my $tick ( @tickets ) {
    printf("%2d %2d %2d %2d %2d %2d\n", @$tick);
}

}

sub pick_numbers { my @picks; my @nums = ( 1..56 );

for( 1..5 ) { push @picks, splice(@nums, int rand @nums, 1) }

@picks = sort { $a <=> $b } @picks;
push @picks, int(rand 46) + 1;

return \@picks;

}


r/ScriptSwap • • Mar 02 '12

MySQL cheat sheet

5 Upvotes

This isn't really a script but more of a notes page I use to keep useful MySQL commands:

These can be either wrapped as a command line argument or run through the mysql shell.

Run through command for plesk:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e ""

Run through command for cPanel:

mysql -e ""

Check used cache and add (all)

mysql -e "show status like 'qcache%';"
mysql -e "SET GLOBAL QUERY_CACHE_SIZE = 32000000 ;"

Find database owner (plesk)

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select a.name from domains as a,db_users as b,data_bases as c where b.login='USERNAME' and b.db_id=c.id and c.dom_id=a.id;"

Check IP Addresses (plesk)

select dom_id,ip_address_id,sys_user_id from hosting;

Check networking information (plesk)

select a.ip_address_id, b.id, b.ip_address, c.displayName from hosting a, IP_Addresses b, domains c where a.dom_id=b.default_domain_id and b.default_domain_id=c.id;

Get all information (plesk)

select a.ip_address_id, b.id, b.ip_address, c.displayName, d.login, e.password from hosting a, IP_Addresses b, domains c, sys_users d, accounts e where a.dom_id=b.default_domain_id and b.default_domain_id=c.id and c.id=d.id and d.account_id=e.id;

Count Users Accessing DB (all)

select user, count(*) as cnt from information_schema.processlist group by user order by cnt;

"Safe" kill MySQL processes (all)

select concat('KILL ',id,';') from information_schema.processlist where info not like "GRANT" and info not like "OPTIMIZE" into outfile '/tmp/mysql_kill.txt';

source '/tmp/mysql_kill.txt';

r/ScriptSwap • • Mar 02 '12

Scripts to setup Wordpress on a low end Debian VPS

5 Upvotes

Based on LowEndBox script, but updated :

https://github.com/Darknight670/lowendscript

An other one, more powerful :

https://github.com/maxexcloo/Minstall


r/ScriptSwap • • Mar 02 '12

Download the entire current contents of kidbleach.com

5 Upvotes

For those unfamiliar with Kidbleach.com you should check it out, cute things inside! I am very new to Bash so I am very open to suggestions with ways to fix this up. Anyways, here it is! Also on Github here.

The way that kidbleach.com works is it calls an rss feed to decide what pictures to display on the homepage. These images are typically kittens, puppies and other such cute things. I realized however that when this rss feed gets updated there is nowhere that those images get saved to. The previous pictures are simply gone from access. I thought it a noble cause to archive teh kittehs so I made this script.

Dependencies:
Wget

#!/bin/bash
#Script to archive teh kittehs(from kidbleach.com)
#This is to be run daily by a cron job


date="$(date +%Y_%m_%d-%H-%M)"; #store current timestamp  
if [ ! -f ./old.txt ]; #if we don't have an old.txt file it is first run  
then  
	echo "This is your first run! Let's make an old.txt file and then do our initial download."  
	touch ./old.txt #on first run we need to make our old.txt file  
	echo $date >> ./old.txt #then, since it is first run we just do a download without any diffing  
	mkdir $date; #make timestamped folder  
	cd $date; #go in it  
	for i in {1..20}; do wget "http://kidbleach.com/images/`printf "%01d" $i`.jpg"; #wget through the numbered images  
	done;  
	cd ..; #go back where we were  
	if [ ! -d ./main_archive ];  
	    then  
		mkdir ./main_archive #if we don't have a main archive we gotta make it  
		cp -r ./$date ./main_archive  
	else  
	    cp -r ./$date ./main_archive #if we do, we just copy  
	fi  
return # we made an old.txt and did initial download and moved to main archive so we are done  
fi  

#so from here on out we know it is not the first run, let's do fancy things!  

echo "Welcome back! Let's do a temporary download that we will check against your old folder and see if it is different."  
mkdir $date; #make timestamped folder  
cd $date; #go in it  
for i in {1..20}; do wget "http://kidbleach.com/images/`printf "%01d" $i`.jpg"; #wget through the numbered     images  
done;  
cd ..; #go back where we were  

#so at this point we have our current folder with the name $date, we need to get a hold of what our old folder name is and store it  
old="$(cat ./old.txt)"  
if [`diff -q $old ./$date` != ""] #if it is quiet when we diff then there is no difference, else there is one  
	then   
		echo "They aren't different, we're done here so let me kill that temporary folder for you." #since there is no difference we can    get rid of the current folder  
		rm -rf ./$date #which we do here  
		return #nothing left to do since there is no diff  
fi  
  
echo "Hurray! They're different! Let's clean up that useless old temporary folder and store your current temporary folder to the main archive"  
rm -rf ./$old #don't need this old shit  
rm ./old.txt #since we have a difference!  
touch old.txt #make a new old.txt  
echo $date >> old.txt #and store our current date to there  
# so now we have killed all the old stuff since it is old and bad  
# we replaced it with new stuff!  
# To archive that new stuff proper for the next time we add it to our main archive  
if [ ! -d ./main_archive ];  
then  
	mkdir ./main_archive #if we don't have a main archive we gotta make it  
	cp -r ./$date ./main_archive  
else  
	cp -r ./$date ./main_archive #if we do, we just copy  
fi  
echo "All done, you have your up to date archive in main_archive now!"  

r/ScriptSwap • • Mar 02 '12

vi wrapper so you can paste output from grep -n.

5 Upvotes

A common pattern at work is to "grep -rn ..." for something of interest, then open that file in vi and go to that line. This vi wrapper lets you paste in the file:line output of "grep -n" as the argument and it tells vi to go directly to that line.

When ever I've shown this to people at work they're surprised that they never thought of it before.

#!/bin/bash

# This is a vi wrapper that lets you paste in output from grep -n as the argument.
# So `v filename:line` will run `vi +line filename` taking you to that line.

if [ -z "$1" ]; then
    echo "usage: $0 filename:line"
    exit 1
fi

file=`echo $1 | sed 's/:.*$//'`
#echo "file       is ($file)";

line=`echo $1 | sed 's/^[^:]*:\([0-9]*\).*$/\1/'`
#echo "line       is ($line)";

if [ -z "$line" -o "$file" = "$line" ]; then
    line=0
fi

if [ -d "$file" ]; then
    echo "Error: arg is a directory: $file"
    exit 1;
fi

vi "$file" +"$line"

r/ScriptSwap • • Mar 01 '12

Automatic MySQL backup script to Amazon S3 using s3cmd

5 Upvotes

I use Amazon S3 as a cheap MySQL backup medium for my VPS. This script backs up multiple MySQL databases each night when run as a cron job.

Combined with Amazon's recently introduced object expiration, I can keep one week’s worth of rolling backups with no work on my part.

Assumptions:

  • You have root access to your server and are able to schedule cron jobs.

  • You have an Amazon Web Services account.

  • s3cmd is installed and configured on your server. There are package repositories available for many Linux distributions.

  • Your website’s files are located in a folder named with the domain name. In this example, we will assume our websites’ domain names and their corresponding folders are coolwebsite.com and notsocoolwebsite.com.

  • The corresponding MySQL databases are named coolwebsite and notsocoolwebsite. Notice the domain (.com) is not included in the database name.

The script:

#!/bin/bash

# MySQL backup script to Amazon S3 using s3cmd
# Run from cron for automated backups
#
# By: Cody Eding ([email protected])
# From: http://codyeding.com/2012/01/27/mysql-backup-script-amazon-s3cmd
#
# License: none (public domain)

# Set variables for home folder, domains to backup and S3 bucket.
# Change these to match your environment.
HOME="user"
SITES=( "coolwebsite.com" "notsocoolwebsite.com" ) # Array of domains
S3BUCKET="backup-bucket"

# Set a variable with the current date in mmddyyyy format.
# This does not need to be changed.
DATE=$(date +"%m%d%Y")

# Loop through each website in the array.
for SITE in ${SITES[@]}
do

# Store the base URL sans domain in a variable.
# This is passed to the mysqldump command and used in the filename.
BASEURL=$(echo $SITE | cut -d"." -f1)

# Build the filename by concatenating strings.
FILE=$BASEURL$DATE.sql.gz

# Backup the database and pass the output to gzip for compression.
# Enter your MySQL credentials.
mysqldump -u <MYSQLUSER> -p<MYSQLPASSWORD> $BASEURL | gzip > /home/$HOME/$FILE

# Put the files on Amazon S3 with s3cmd.
# s3cmd will not work in a script without passing the path to the config file.
s3cmd --config /home/$HOME/.s3cfg put $FILE s3://$S3BUCKET/mysql/$DATE/$URL

# Delete the backup off of the local server.
rm $FILE

# End the loop.
done

r/ScriptSwap • • Jul 07 '24

lf a basic script that copies my movement and mouse clicks on loop

4 Upvotes

so basicaly i would firstly like show the program what to do and then it would just repeat that on loop is there any sort of a program or an app that mimics ur inputs and puts them on loop(if this sounds dumb im sorry im new to scripting)


r/ScriptSwap • • Oct 05 '23

Looking for assistance with a script

4 Upvotes

I have a script I cobbled together to query DNS for A records and CNAME records, ping all of the host names, and then dump the results into a CSV file. This is working OK, but I want to take it up a step and have it export to an Excel spreadsheet and also color code hosts that are online as green and and offline as red. I can open the CSV file in Excel and add formatting rules to accomplish this, but I really want to just automate this when the file gets created. However, I'm having issues getting the script to work exporting to a spreadsheet. Here is what I have to export to a CSV:

# Define the DNS server to query
$dnsServer = "IP.ADD.RESS"
# Define the output CSV file
$outputFile = "DNS_Ping_Results.csv"
# Create an empty array to store the results
$results = @()
# Query A records and CNAME records from DNS
$dnsARecords = Get-DnsServerResourceRecord -ComputerName $dnsServer -ZoneName "domain.com" -RRType A
$dnsCNAMERecords = Get-DnsServerResourceRecord -ComputerName $dnsServer -ZoneName "domain.com" -RRType CNAME
# Function to ping an address and return the result
function Ping-Address($address) {
$pingResult = Test-Connection -ComputerName $address -Count 1 -ErrorAction SilentlyContinue
if ($pingResult) {
return "Online"
} else {
return "Offline"
}
}
# Loop through A records and ping each address
foreach ($record in $dnsARecords) {
$recordObject = New-Object PSObject -Property @{
"RecordType" = "A"
"HostName" = $record.HostName
"IPAddress" = $record.RecordData.IPv4Address.IPAddressToString
"PingStatus" = (Ping-Address -address $record.RecordData.IPv4Address.IPAddressToString)
}
$results += $recordObject
}
# Loop through CNAME records, resolve to A records, and ping each address
foreach ($record in $dnsCNAMERecords) {
$cname = $record.RecordData.HostNameAlias
$resolvedARecord = Resolve-DnsName -Name $cname | Where-Object { $_.QueryType -eq "A" } | Select-Object -First 1
if ($resolvedARecord) {
$recordObject = New-Object PSObject -Property @{
"RecordType" = "CNAME"
"HostName" = $record.HostName
"CNAME" = $cname
"IPAddress" = $resolvedARecord.IPAddress
"PingStatus" = (Ping-Address -address $resolvedARecord.IPAddress)
}
$results += $recordObject
}
}
# Export the results to a CSV file
$results | Export-Csv -Path $outputFile -NoTypeInformation
Write-Host "DNS query and ping results exported to $outputFile"

Can any of you assist on the end part and get it to work with exporting to Excel with formatting rules?


r/ScriptSwap • • Jul 22 '23

Python/Selenium Script To Remove All Reddit Comments

Thumbnail self.learnpython
4 Upvotes