#Powershell
Explore tagged Tumblr posts
Text
I've been struggling for *days* to learn the syntax of some code at work to fix a massive problem involving 9 million address records, and shot in the dark I was like there's gotta be a PowerShell developer in the Chicago Competitive MTG discord server. And sure enough I got a bite and my whole week has been saved by a Lemur named Daryl
109 notes
·
View notes
Text

look at my objects boy
#art#object show#osc#ocs#nfa#dfa#sobel#bash#powershell#i know the sobel one is kind of inaccurate bc it's an x-direction kernel and bla bla. it's ok. smile with me and dance
90 notes
·
View notes
Text
Just spend about like 4 hours learning powershell just so that i can semi-automate installing like 6 apps via powershell
His name is pissy and i love him.
52 notes
·
View notes
Text
downloading youtube subtitles/captions en masse (or videos, with diff options) & searching them
i wanted to take a playlist and download all of the autogenerated captions so i could then search them. here's the solution i've come up with. tried to cover even the basics here and not assuming you have any particular experience with installing/using stuff in command line
all these instructions will be for windows (11), the wiki has instructions for other OSes
install yt-dlp this can be used to download youtube and thousands of other sites' videos with a high level of customization, and fortunately for me also allows the option of downloading the subtitles without the video. i didn't really want to download 600+ videos for my project!
https://github.com/yt-dlp/yt-dlp -> download the yt-dlp.exe (see for other OSes)
put it in an executable path, i just added a new one to make things easier, see under the cut for detailed instructions
install ffmpeg this is needed for a variety of things, but specifically for my case, i need it to convert the .vtt file that youtube gives us (which is very cluttered to read because it has formatting info in it too) to .srt which is text and timing only
https://www.ffmpeg.org/ -> same deal as yt-dlp, ditto the executable path - i downloaded this one: https://www.gyan.dev/ffmpeg/builds -> ffmpeg-release-essentials.zip
install srt_fix (for cleaning up autogenerated captions) to fix the doubling of text caused by how youtube creates the autogenerated captions:
before fix -> after
https://github.com/bindestriche/srt_fix -> create a folder in your path with the .exe's called 'yt-dlp-plugins' and copy the folder with srt_fix in it there (so the final path of the srt_fix.py for me is: C:\Users\ns\bin\yt-dlp-plugins\srt_fix-1.0.1\yt_dlp_plugins\postprocessor)
there are other methods of installation on that page as well as a link to the general yt-dlp plugin installation documentation
install grepWin if you want to search the text of the files quickly (which was the whole point of this project for me 🤪) grepWin is a good option, made by the person who did tortoisesvn. at some point i might look into putting these on The Internet somewhere that would be searchable and link to the original videos/timestamps, but right now, i just wanted a quick way to search them.
https://github.com/stefankueng/grepWin - click on the release on the right
documentation with direct link to current release: https://tools.stefankueng.com/grepWin.html
now we're ready to go!
open powershell (start->windows powershell) and navigate to where you want the files to be placed, for example: (ps: press tab after writing a couple letters and it'll fill out the dir name automatically)
paste your command (using one of the panel videos for example):
yt-dlp -t sleep --write-auto-sub --convert-subs "srt" --skip-download --use-postprocessor srt_fix:when=before_dl https://youtu.be/tjqkei7nLhw?si=EfaEnVnf-oCv1kxt
replace with the video or playlist you're interested in. recommend starting with a video first :) if it seems to be bombing out repeatedly, stop with ctrl+c
the flags are needed as follows:
-t sleep - if you don't use this, youtube will stop the download after 300 videos and make you wait an hour, this adds some delays to get around that
--write-auto-sub - this is to grab the autogenerated captions as opposed to the uploaded/created versions
--convert-subs "srt" - to use ffmepg to convert the vtt subs into an srt file
--skip-download - to not download the actual video, we only want the subtitles
--use-postprocessor srt_fix:when=before_dl - this is calling the srt_fix specifically when using the skip-download flag
when it's working correctly, it'll look something like this and the folder will contain two files per video, the original srt and the -fixed srt with the non-duplicated text
the file it creates is named (by default, this can be changed, see the docs) video title [youtube video id] - aka plop that string on the end of this url and it'll pull up the source video https://www.youtube.com/watch?v=
and lastly, searching! obviously this is where things kind of break down, because common words are more likely to be understood and captioned correctly; but proper names, sketchy audio quality, mumbling, etc is going to miss a lot. just for kicks, i thought i'd see if it ever got mark of cain:
detailed instructions on adding a new entry to the path environment variable below - just be careful with this
open system properties - search for that in the start menu or enter environmental - it'll pull it up
in the system properties window -> click environment variables
double-click the user variable Path
click New and put the path. i made a new folder at my profile folder level (ns) called 'bin' for this:
so the path i entered was %USERPROFILE%\bin
#tutorial#yt-dlp#youtube#captions#powershell#downloading videos#panel transcript project#i have no idea what to tag this lol#this is beyond niche content but maybe someone somewhere out there also has a project this might be handy for
4 notes
·
View notes
Text
I spent so long today trying to figure out why .gitignore wasn’t working.
I spent *hours* going through so many StackOverflow questions and reddit posts where brand new developers are trying to use a .gitignore for the first time and getting the syntax wrong or putting it in the wrong directory or naming the file wrong or they already tracked the files. All common mistakes I made when I was new to this, but not what was wrong for me.
I’m suddenly reminded what it was like back then everytime I had a problem googling every little issue and thinking some obscure issue was happening or there was a bug in git or something, and then I’d find the small error I’d made. But now I understand it so well I’m stumped what could be wrong.
Flashback to when I was trying to decide which OS to use when writing it and decided it was simple enough that Windows would be fine. Plus I want this to be cross platform and so it’ll be good to be forced to deal with Windows compatibility up front.
Then finally I found the issue: I created the .gitignore from Powershell and it defaults the encoding to UTF-16LE??? Why would they do that? Just to prank people trying to create files to be used literally anywhere???
Changed it to UTF-8 and it works.
god
19 notes
·
View notes
Text
Y’all ever make up a bunch of copy-paste men for the hell of it (profiles under the cut)
8 notes
·
View notes
Text
Powershell syntax is not confusing
(you are just confused because posix compliant shells have corrupted your mind)
> do-action -param "string" $variable (do this first) [type]value
To declare a function:
function do-mythings {
param([int]$argument)
$argument + 5
}
> do-mythings -arg 5
10
That's all you need to get started.
Numbers are just numbers.
Inline math just works. Parentheses for order of operations.
Strings you put in quotes - double quotes allow interpolation, single quotes don't. This is the same as sh.
All variables are prefixed with $s. Even when declaring them. This makes slightly more sense than sh.
A region in {squirrelly braces} gets the [scriptblock] data type. It's like a lambda but comprehensible by mere mortals.
if (test) {success} else {fail} - the test is always executed first because (). Success and fail conditions only depending on the test. They're script blocks. No weird special syntax, if may as well be a user function.
Functions can be named anything, but the convention is Verb-PlaceThing. Not case sensitive.
Named arguments are specified with a single hyphen, like MIT Unix software (xorg for instance). If there is only one parameter the name is optional, etc. Param names can be abbreviated as long as they aren't ambiguous. This is also easy to follow with your own functions, unlike in sh (fricking hate getopt).
Types are inferred dynamically because it's easier to write scripts that way. If you need to force something (variable, expression, whatever) to have a specific type, put it in [brackets] beforehand. The type names are the same as c# and every other post-algol language. For comparison, posix shell only has one type, String.
To make an array, @(item1, item2, etc)
To make a hashtable, @{
key1 = val1
key2 = val2
}
Adding strings concatenates them together. Adding numbers adds their values. If this is not satisfactory, declare their types and it will work.
All expressions are technically objects with properties and methods. $var.property returns the value of that property. $var.invokeMethod() runs the method, which is just a function built into that data type by some poor intern 20 years ago.
Pipes (|) work similarly to sh, but transfer objects. The current object in the pipeline is always the variable $_.
As a bonus, here's a one-liner for opening Internet Explorer on Windows 11 (they lied, it's still there, they will never remove it)
(new-object -com "InternetExplorer.application").visible = $true
COM is an old windows api. Com Objects are just instances of apps. We open internet explorer as a com object.
The parentheses sets that as an expression, and its return value _is_ the exploder. It has properties like visibility, which is $false by default. This is boring so set it to $true. Now we have a real working instance of an app they've been trying to remove for years, because they can't actually remove it merely hide it away. As long as the windows api can parse HTML, this will still work.
#powershell#propaganda#i was going to write this up anyway but#you had to awaken the beast#you know who you are#mir rants#internet explorer
71 notes
·
View notes
Text
She Powers on my Shell til I windows
#So I'm learning PowerShell And it's so Good it's making me hate windows less#computers#microsoft windows#command line#powershell#shitpost
3 notes
·
View notes
Text
forgot what powershell was called for a moment and ended up with this fucking thing
4 notes
·
View notes
Text
How to Reset Windows Update Group Policy Settings

How to Reset Windows Update Group Policy Settings | https://tinyurl.com/27evw79k | #GroupPolicy #Guides #Microsoft #Windows #WindowsUpdate #WSUS If you’re transitioning away from Windows Server Update Services (WSUS) or need to troubleshoot Windows Update issues, resetting the Windows Update Group Policy Object (GPO) settings can be essential. Often, corruption in registry permissions can prevent expected changes from taking effect. This guide will walk you through the process of resetting these settings by removing the specific registry key responsible for Windows Update policies. Steps to Reset Windows Update GPO Settings Why Reset Windows Update GPO Settings? Resetting the Windows Update GPO settings is crucial when: Prerequisites Step-by-Step Guide 1. Open PowerShell with Administrative Privileges To reset the Windows Update […] Read more... https://tinyurl.com/27evw79k
2 notes
·
View notes
Text
Why Did Microsoft Make PowerShell Hot and Evil?!?!?
#microsoft#hot and evil#cunty#i think?#Windows#Powershell#moe anthropomorphism#i guess?#she's even got fucking scars!
2 notes
·
View notes
Text
JavaScript Node.js PowerShell JSON Repeat
Lately, I've taken a lot of time to reacquaint myself with JavaScript usage in Node.js. Specifically, I'm learning all the basic things I enjoy doing in PowerShell: File manipulation (list, read, write) and data manipulation (parse, extract, interpret, summarize).
Specifically, my favorite thing is to see something of interest on a website and/or analyze a website's requests in the Network tab of DevTools (CTRL+SHIFT+I). It has to be something useful. Such things can be scraped for data I might want. The way I do that is in the Network tab of DevTools (Chrome, MS Edge). Looking at a request, I can right click and get the PowerShell (or other code) that would give me that exact same information in Windows Terminal. Then, I typically do an ad-hoc script to get what I want.
Current Web Scrape++ Project
The project that has my interest at the moment is one where I'm taking all the text of a copyrighted version of the Bible, then using DOM queries and JavaScript to get just the verse numbers and verse text per chapter from the HTML. It sounds as complicated as it is, but it's the kind of thing I do for fun.
Node.js comes into play when I want to loop through all the HTML I've pulled and sanitized. The sanitization wasn't easy. I kept only the HTML with actual Bible text - which reduced the HTML payload to less than 2% its original size. That part was in PowerShell and Visual Studio Code. But I digress.
Using the Console of DevTools, I already have the JavaScript I'll need to pull what I want from the HTML file data into an array of "verse" objects, which I can then easily translate to JSON and write out.
Next, my goal is to take the data, store it as JSON files, and then manipulate it with PowerShell. For instance, I wonder what it looks like if I replace the word "Lord" with "Earl" or "Duke". As silly as that sounds, that's the entire modus operandi for my project, which has been maybe as much as 6 to 8 hours. The rest probably won't take that long, but each step has to be pursued with the smallest steps I can think to make. (There's no use looping 1189 chapters / files of HTML text to get erroneous stuff, so I go small and then large.)
2 notes
·
View notes
Text
Disabling or Uninstalling Unnecessary Services and Apps in Windows 10
Windows 10 is a powerful and versatile operating system that offers many features and functionalities. However, not all of them are necessary or useful for every user. In fact, some of the services and apps that come preinstalled or run in the background can pose security risks or slow down your system performance. In this blog post, we will describe which unnecessary services and apps you should…

View On WordPress
2 notes
·
View notes
Text
Exchange Server 2019: Σύγχρονη και Ασφαλής Επικοινωνία
Πώς να Δημιουργήσετε Ένα Ανθεκτικό και Ασφαλές Περιβάλλον Επικοινωνίας με το Exchange Server Standard 2019
Στον σημερινό επιχειρηματικό κόσμο, η ανάγκη για ασφαλή και αποτελεσματική επικοινωνία είναι κρίσιμη. Το Exchange Server Standard 2019 προσφέρει μια ολοκληρωμένη λύση για επιχειρήσεις που επιθυμούν να αναβαθμίσουν το σύστημα μηνυμάτων τους, π��ρέχοντας αυξημένη ασφάλεια και βελτιωμένη απόδοση.
Με την τεχνολογία να εξελίσσεται ραγδαία, η Microsoft με το Exchange Server 2019 επικεντρώνεται στην παροχή ενός περιβάλλοντος που ενισχύει την παραγωγικότητα και την ασφάλεια. Ανάμεσα στις βασικές του δυνατότητες είναι η βελτιωμένη αποθήκευση δεδομένων, η αυξημένη διαθεσιμότητα και οι ενσωματωμένες λύσεις ασφάλειας, που προστατεύουν τις ευαίσθητες πληροφορίες της επιχείρησής σας.
Οι επαγγελματίες IT θα εκτιμήσουν την ευκολία διαχείρισης του Exchange Server 2019. Με τη βοήθεια του PowerShell και του νέου Exchange Admin Center, η διαχείριση και η παρακολούθηση του συστήματος γίνεται πιο αποδοτική και προσαρμόσιμη στις ανάγκες της επιχείρησης. Η υποστήριξη για μεγαλύτερες βάσεις δεδομένων και η δυνατότητα για δυναμική προσαρμογή του αποθηκευτικού χώρου προσφέρουν μια επιπλέον ασφάλεια και ευελιξία στις επιχειρήσεις.
Επιπλέον, το Exchange Server 2019 ενσωματώνει προηγμένες δυνατότητες προστασίας από απειλές, όπως anti-malware και anti-phishing, διασφαλίζοντας ότι τα δεδομένα και οι επικοινωνίες σας είναι προστατευμένα από εξωτερικές απειλές. Η δυνατότητα για ασφαλή ανακτήση δεδομένων και η συνεχής παρακολούθηση της δραστηριότητας του διακομιστή συμβάλλουν στη διατήρηση ενός ασφαλούς περιβάλλοντος επικοινωνίας.
Η προσαρμογή και η κλιμάκωση του Exchange Server 2019 είναι εύκολη υπόθεση, επιτρέποντάς σας να αυξήσετε την απόδοση καθώς η επιχείρησή σας αναπτύσσεται. Επιλέγοντας την κατάλληλη άδεια χρήσης, όπως αυτή που μπορείτε να βρείτε στο exchange server standard 2019 τιμή άδειας, μπορείτε να εξασφαλίσετε ότι η επιχείρησή σας θα έχει το ιδανικό σύστημα επικοινωνίας για τις ανάγκες της.
Συνοπτικά, το Exchange Server Standard 2019 είναι η ιδανική επιλογή για επιχειρήσεις που αναζητούν μια σύγχρονη, ασφαλή και αποδοτική λύση επικοινωνίας. Η επένδυση σε αυτή την πλατφόρμα θα σας βοηθήσει να διατηρήσετε τον έλεγχο των δεδομένων σας, να αυξήσετε την παραγωγικότητα και να εξασφαλίσετε ότι η επιχείρησή σας είναι προετοιμασμένη για τις προκλήσεις του μέλλοντος.
0 notes
Text
Progressive Learning in Coding: The Elevator Approach
Learning new skills can be hard and when working with complex technology like coding it can be confusing. Over the years as I have learnt more technologies, I have found an approach that has helped keep learning simple. This is something I was taught before when I first started and continue to pass on to my mentees as a senior. The approach is the elevator effect and in this post I will breakdown…
0 notes