Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "powershell"
-
Few months ago, I ate so many MBs (just 300+ GBs) in a month that my ISP blocked my connection and sent a worker to check if i was sharing my internet connection with neighbours etc. { They say UNLIMITED downloads when selling packages }
I was so pissed that after restoration I wrote autorun-on-startup powershell which keeps downloading a 100MB file forever just to eat bandwidth.
This month my downloads crossed a TB.
I feel like I've pissed in ISP's face just to show that if I'm not eating TBs every month, it doesn't mean i can't do it.14 -
Frack he did it again.
In a meeting with the department mgr and going over a request feature *we already discussed ad nauseam* that wasn’t technically feasible (do-able, just not worth the effort)
DeptMgr: “I want to see the contents of web site A embedded in web site B”
Me: “I researched that and it’s not possible. I added links to the target APM dashboard instead.”
Dev: “Yes, it’s possible. Just use an IFrame.”
DeptMgr: “I thought so. Next sprint item …what’s wrong?…you look frustrated”
Me: “Um..no…well, I said it’s not possible. I tried it and it doesn’t work”
Dev: “It’s just an IFrame. They are made to display content from another site.”
Me: “Well, yes, from a standard HTML tag, but what you are seeing is rendered HTML from the content manager’s XML. It implemented its own IFrame under the hood. We already talked about it, remember?”
Dev: “Oh, that’s right.”
DeptMgr: “So it’s possible?”
Dev: “Yea, we’ll figure it out.”
Me: “No…wait…figure what out? It doesn’t work.”
Dev: “We can use a powershell script to extract the data from A and port it to B.”
DeptMgr: “Powershell, good…Next sprint item…”
Me: “Powershell what? We discussed not using powershell, remember?”
Dev: “It’s just a script. Not a big deal.”
DeptMgr: “Powershell sounds like a right solution. Can we move on? Next sprint item….are you OK? You look upset”
Me: “No, I don’t particularly care, we already discussed executing a powershell script that would have to cross two network DMZs. Bill from networking already raised his concern about opening another port and didn’t understand why we couldn’t click a link. Then Mike from infrastructure griped about another random powershell script running on his servers just for reporting. He too raised his concern about all this work to save one person one click. Am I the only one who remembers this meeting? I mean, I don’t care, I’ll do whatever you want, but we’ll have to open up the same conversations with Networking again.”
Dev: “That meeting was a long time ago, they might be OK with running powershell scripts”
Me: “A long time ago? It was only two weeks.”
Dev: “Oh yea. Anyway, lets update the board. You’ll implement the powershell script and I’ll …”
Me: “Whoa..no…I’m not implementing anything. We haven’t discussed what this mysterious powershell script is supposed to do and we have to get Mike and Bill involved. Their whole team is involved in the migration project right now, so we won’t see them come out into the daylight until next week.”
DevMgr: “What if you talk to Eric? He knows powershell. OK…next sprint item..”
Me: “Eric is the one who organized the meeting two weeks ago, remember? He didn’t want powershell scripts hitting his APM servers. Am I the only one who remembers any of this?”
Dev: “I’m pretty good with powershell, I’ll figure it out.”
DevMgr: “Good…now can we move on?”
GAAAHH! I WANT A FLAMETHROWER!!!
Ok…feel better, thanks DevRant.11 -
Me: p
Windows Search: Paint
Me: pow
WS: PowerPoint
Me: powers
WS: Powershell
Me (typing too quickly to notice Powershell is already there): powershell
WS: ummm idk11 -
I was activating virtualenv in powershell when my younger brother came in.
Me: *all nervous* please don't think I'm hacking or trying to set off a bomb. (He always thinks I'm hacking and tells on me.)
Brother: *silent*
Me: *even more nervous* I don't want my laptop to get taken away. Don't tell on me and say I'm hacking, because I'm not.
Brother: Oh, I know you're not hacking this time.
Me: You do? *relieved.*
Brother: Yeah, because this time it's a blue background, not a black one.
Me: Oh, haha. So you're only scared of things such as these? *opens CMD and Git Bash* you know, just because it's dark themed, doesn't mean it's malicious. Besides it—
Brother: oooOooOh! You're hacking again! I'm telling on you!
*Note to self: Never use dark theme in front of the ignorant again.)43 -
Just created my first program using powershell, It runs in the morning and gives me a weather forecast.18
-
Me : "I want to remove this file"
Windows powershell : "No you can't"
Me : "I'd like to remove this file and then sort all my /home files in alphabetical order and rename all of then adding some text before and after there actual name"
Linux bash : "Ok. Done."5 -
So today I was working on some PowerShell scripts and I get a question from a colleague
Colleague: So, How's your girlfriend doing ?
Me: "You cannot call a method on a null-valued expression" -ForegroundColour "Red"
*Colleague throws something at me*
Totally worth it! -
TIL Powershell is open source (MIT)!
https://github.com/PowerShell/...
Apparently Microsoft has opensourced a lot of stuff:
https://opensource.microsoft.com
Here's the list, sorted by "awesomeness" (I kid you not):
https://opensource.microsoft.com//...
Interesting (ง°ل͜°)ง8 -
TLDR: In defense of Powershell - the rant:
I don’t get the Powershell hate.
You don’t hate a screwdriver for not being able to turn a nut, you just *don’t use a screwdriver to turn a nut*
Once you recognize what the tool is good for and you don’t try to use it like Bash, it’s wildly powerful, and satisfying to use in a way Cmd.exe never was.
Cygwin or a Linux Subsystem can only go so far on a Windows computer. You’re dealing with two fundamentally different OS architectures. It makes sense you’d need different tools.
And like it or not, Microsoft owns the non-tech-user desktop , corners the non-tech server business market, and Active Directory is THE tool for managing Windows desktops on a large scale - So Wanblows is not going away anytime soon.
Automation without some weird ass sysVol batch login script is finally possible. Anyone who knows .Net classes can leverage their methods from directly within Powershell. Remote management of headless Windows servers is now a reality. If you have an Office 365 Exchange server you can literally Powershell remote to it for management, just like your favorite cloud hosted Linux distribution.
No one said Windows is a better OS, but an object based shell on an object based OS *makes sense*. It’s useful for its environment. Let it be.10 -
This story starts over two years ago... I think I'm doomed to repeat myself till the end of time...
Feb 2014
[I'm thrust into the world of Microsoft Exchange and get to learn PowerShell]
Me: I've been looking at email growth and at this rate you're gonna run out of disk space by August 2014. You really must put in quotas and provide some form of single-instance archiving.
Management: When we upgrade to the next version we'll allocate more disk, just balance the databases so that they don't overload in the meantime.
[I write custom scripts to estimate mailbox size patterns and move mailboxes around to avoid uneven growth]
Nov 2014
Me: We really need to start migration to avoid storage issues. Will the new version have Quotas and have we sorted out our retention issues?
Management: We can't implement quotas, it's too political and the vendor we had is on the nose right now so we can't make a decision about archiving. You can start the migration now though, right?
Me: Of course.
May 2015
Me: At this rate, you're going to run out of space again by January 2016.
Management: That's alright, we should be on track to upgrade to the next version by November so that won't be an issue 'cos we'll just give it more disk then.
[As time passes, I improve the custom script I use to keep everything balanced]
Nov 2015
Me: We will run out of space around Christmas if nothing is done.
Management: How much space do you need?
Me: The question is not how much space... it's when do you want the existing storage to last?
Management: October 2016... we'll have the new build by July and start migration soon after.
Me: In that case, you need this many hundreds of TB
Storage: It's a stretch but yes, we can accommodate that.
[I don't trust their estimate so I tell them it will last till November with the added storage but it will actually last till February... I don't want to have this come up during Xmas again. Meanwhile my script is made even more self-sufficient and I'm proud of the balance I can achieve across databases.]
Oct 2016 (last week)
Me: I note there is no build and the migration is unlikely since it is already October. Please be advised that we will run out of space by February 2017.
Management: How much space do you need?
Me: Like last time, how long do you want it to last?
Management: We should have a build by July 2017... so, August 2017!
Me: OK, in that case we need hundreds more TB.
Storage: This is the last time. There's no more storage after August... you already take more than a PB.
Management: It's OK, the build will be here by July 2017 and we should have the political issues sorted.
Sigh... No doubt I'll be having this conversation again in July next year.
On the up-shot, I've decided to rewrite my script to make it even more efficient because I've learnt a lot since the script's inception over two years ago... it is soooo close to being fully automated and one of these days I will see the database growth graphs produce a single perfect line showing a balance in both size and growth. I live for that Nirvana.6 -
Tip for devs (esp front end):
Sublime text (and few other inferior editors) has a plugin called "transparency" that allows your editor to be transparent.
Windows 10 powershell consoles can be made transparent.
1) Open browser
2) Open command prompt over it with 75% transparency
3) Open editor over both with 50% transparency.
4) Set editor to fullscreen, no-distraction mode to center the text (Shift+F11 in sublime)
Enjoy coding while constantly viewing the code, the browser and monitoring the cmd prompt at the same time, without having to click Alt+Tab a zillion times.17 -
There is a couple at the table next to me in this café arguing about PowerShell and, even though it's Windows, I'm having a bit of a nerdgasm. 🤓4
-
Background: I'm proficient at PowerShell, I was told that I got hired to my previous job (as DevOps engineer) mainly because of that skill.
Few months after I started I wrote a script to automate some processes. My boss saw the script and told me that it was too complicated, and that I should make it more simple.
Now I'm all into clean code, meaningful names, small functions.
So the code was readable and maintainable.
I asked him in what way is it complicated. He didn't know exactly. (Later I figured that he didn't know of some of the (built-in) cmdlets and functions I used.)
He raised his hand high and made a gesture and explained that I'm "that high (skill? enthusiasm?)", then lowered his hand to a lower position to mark the bottom line, then raised it up half way up and said that he wants me here - in the middle.
After that he added: "This is not Microsoft! and we don't own the 3 other buildings that can be seen from our office window" and pointed at the window.
I was surprised by his comment, I didn't know how to respond.
I've got more stories to share about that workplace.
I can't believe I stayed at that place for 1 year and 2 months.16 -
I’m the embodiment of lazy...
I had turned on the TV in the living room earlier and put on sesame st. for my daughter to watch.
Some time passes, I’m trying to work in the back bedroom, have daughter in my arms and she’s falling asleep. I forgot to turn off the TV in the front room.
Didn’t want to get up from my desk so I just wrote up a powershell script to connect to the computer plugged into the TV and kill chrome. (The Computer sleeps after 10 minutes, and the TV shuts off after 10 more minutes of no display signal).
Script was successful as I heard Elmo laughing, then suddenly all was quiet 🤫7 -
*plays game for 10h consecutive*
.. yeah yeah I know what you're thinking. This guy doesn't have a life. And you're probably right.
*gets hungry*
… I could really use a hamburger right now 🤔
… But the fast food tent is ~30 minutes walking distance away, and this game automatically logs you out after 30 mins inactivity...
What if I could program in some delayed input?
*jazz hand routine engages*
Hmm.. so if I do something like:
PS C:\Users\Condor> $wshell.AppActivate('BlueStacks'); Sleep 1; $wshell.SendKeys('abusing this chat~'); Sleep 1; $wshell.SendKeys('for upkeep of 10h play~'); Sleep 1; $wshell.SendKeys('while I get myself a hamburger~'); Sleep 1; $wshell.SendKeys('sorry~');
that should work, no?
Le output:
abusing this chat
sorry
Well, even for PowerShit.. good enough, right? It gets the message across 🙃
Hmm.. let's just put an afk message instead, as I'm using the guild chat and don't want any of the members to think that I'm a freak
PS C:\Users\Condor> Sleep 1; $wshell.AppActivate('BlueStacks'); Sleep 1; $wshell.SendKeys('afk~');
.. which seems to work like a charm.. alright, perhaps I can entrust PowerShell to do that again after a 900 second delay, which should give me enough time to get that hamburger.
*comes back home*
"Logged out due to 30 minutes of inactivity."
MICROSOFT POWERSHIT, YOU'VE HAD BUT ONE FUCKING JOB!!!!
Well, guess I'll do that no-life 10+h gaming session somewhere next year again then. Thanks Powercunt!21 -
I remember opening an old script file on our server for scheduled tasks, and thinking to myself; What idiot wrote this mess? It's unnecessarily complex, solving the problem in a convoluted way. And of course, not a single line of comments.
After reading it through and through many times to understand what each line did I kept repeating to myself; What an imbecile... Being this stupid should be illegal... Coding should require some sort of license to prevent idiots from doing this!
Then of course, it slowly dawned on me. I had written this crap one year before. I'm the idiot... 😐
I've commented every line religiously since then.4 -
cw: I need a server to put my node backend
me: sure, I'll run a docker container for you
cw: nice, I've never worked with docker but I learn quickly, I'm already reading the Docker file docs
me: no wait, you don't need to learn anything, you'll be inside the container, so you only need an ssh connection and that's it
cw: this Dockerfile stuff is really complicated, it'll take me a while, but it's ok you don't have to worry, I like learning new things
me: you won't need that, just imagine it's a cloud server with Ubuntu installed, you only have to use it, I'll put node, git and ssh there for you
cw: ok got it, I'll have to learn the commands to run the docker, I'm on windows but I can use PowerShell and stuff I'll figure it out
me: ...
cw: ssh is a linux command right? does it have a push or publish option? how do you upload files there
me: ...you can use a ftp client but you'll need ssh to run the node server
cw: ok, I'm almost done with the Dockerfile, I only need to add git and nodejs, I'm starting to understand this thing...
me thinking: yeah keep doing that, you're such a crack, such a quick learner...
This son of a bitch is either a retard or is doing it on purpose and laughing at me the whole time, making my life so miserable, but I'm about to go insane with this dude, I'm proud of how I've been able to control myself, BUT ONE OF THESE DAYS I'LL LOSE MY COOL AND FORCE THIS MOTHERFUCKER TO DRINK A BIG POT OF BOILING, SALTY AND STINKING VOMIT WITH A SIDE OF STEAMING DIARRHEAL GREEN DOG SHIT WITH WHITE CHOCOLATE CHIPS WHILE I PUT MY OLD CRT MONITOR TO GOOD USE BY BEATING HIS FUCKING HEAD WITH IT!!!3 -
Created a whole program from scratch in Powershell, while learning it on the fly. Developed GUI and got some friends to beta test it. Fixed bugs and finally the manager saw. After using it for not even a whole minute, he says "Looks fine, just make it in Python and we'll see".
FML
Fuck Python
Fuck this shit stupid world19 -
My wife and I just put an offer on a house, 7 try and this offer was accepted. We're trying to get our financial approval together, she's a nervous wreck and keeps asking me if that's any news because I'm dealing with the bank. So I set this up.
She called me after a couple hours to tell me the dog house had called to confirm my reservation.3 -
Okay guys, this is it!
Today was my final day at my current employer. I am on vacation next week, and will return to my previous employer on January the 2nd.
So I am going back to full time C/C++ coding on Linux. My machines will, once again, all have Gentoo Linux on them, while the servers run Debian. (Or Devuan if I can help it.)
----------------------------------------------------------------
So what have I learned in my 15 months stint as a C++ Qt5 developer on Windows 10 using Visual Studio 2017?
1. VS2017 is the best ever.
Although I am a Linux guy, I have owned all Visual C++/Studio versions since Visual C++ 6 (1999) - if only to use for cross-platform projects in a Windows VM.
2. I love Qt5, even on Windows!
And QtDesigner is a far better tool than I thought. On Linux I rarely had to design GUIs, so I was happily surprised.
3. GUI apps are always inferior to CLI.
Whenever a collegue of mine and me had worked on the same parts in the same libraries, and hit the inevitable merge conflict resolving session, we played a game: Who would push first? Him, with TortoiseGit and BeyondCompare? Or me, with MinTTY and kdiff3?
Surprise! I always won! 😁
4. Only shortly into Application Development for Windows with Visual Studio, I started to miss the fun it is to code on Linux for Linux.
No matter how much I like VS2017, I really miss Code::Blocks!
5. Big software suites (2,792 files) are interesting, but I prefer libraries and frameworks to work on.
----------------------------------------------------------------
For future reference, I'll answer a possible question I may have in the future about Windows 10: What did I use to mod/pimp it?
1. 7+ Taskbar Tweaker
https://rammichael.com/7-taskbar-tw...
2. AeroGlass
http://www.glass8.eu/
3. Classic Start (Now: Open-Shell-Menu)
https://github.com/Open-Shell/...
4. f.lux
https://justgetflux.com/
5. ImDisk
https://sourceforge.net/projects/...
6. Kate
Enhanced text editor I like a lot more than notepad++. Aaaand it has a "vim-mode". 👍
https://kate-editor.org/
7. kdiff3
Three way diff viewer, that can resolve most merge conflicts on its own. Its keyboard shortcuts (ctrl-1|2|3 ; ctrl-PgDn) let you fly through your files.
http://kdiff3.sourceforge.net/
8. Link Shell Extensions
Support hard links, symbolic links, junctions and much more right from the explorer via right-click-menu.
http://schinagl.priv.at/nt/...
9. Rainmeter
Neither as beautiful as Conky, nor as easy to configure or flexible. But it does its job.
https://www.rainmeter.net/
10 WinAeroTweaker
https://winaero.com/comment.php/...
Of course this wasn't everything. I also pimped Visual Studio quite heavily. Sam question from my future self: What did I do?
1 AStyle Extension
https://marketplace.visualstudio.com/...
2 Better Comments
Simple patche to make different comment styles look different. Like obsolete ones being showed striked through, or important ones in bold red and such stuff.
https://marketplace.visualstudio.com/...
3 CodeMaid
Open Source AddOn to clean up source code. Supports C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript.
http://www.codemaid.net/
4 Atomineer Pro Documentation
Alright, it is commercial. But there is not another tool that can keep doxygen style comments updated. Without this, you have to do it by hand.
https://www.atomineerutils.com/
5 Highlight all occurrences of selected word++
Select a word, and all similar get highlighted. VS could do this on its own, but is restricted to keywords.
https://marketplace.visualstudio.com/...
6 Hot Commands for Visual Studio
https://marketplace.visualstudio.com/...
7 Viasfora
This ingenious invention colorizes brackets (aka "Rainbow brackets") and makes their inner space visible on demand. Very useful if you have to deal with complex flows.
https://viasfora.com/
8 VSColorOutput
Come on! 2018 and Visual Studio still outputs monochromatically?
http://mike-ward.net/vscoloroutput/
That's it, folks.
----------------------------------------------------------------
No matter how much fun it will be to do full time Linux C/C++ coding, and reverse engineering of WORM file systems and proprietary containers and databases, the thing I am most looking forward to is quite mundane: I can do what the fuck I want!
Being stuck in a project? No problem, any of my own projects is just a 'git clone' away. (Or fetch/pull more likely... 😜)
Here I am leaving a place where gitlab.com, github.com and sourceforge.net are blocked.
But I will also miss my collegues here. I know it.
Well, part of the game I guess?7 -
PowerShell is the slowest, most pathetic, unelegant attempt at copying bash.
The Command-Names are stupid and impossible to remember, the syntax is too awkward to put a name on it.
And holy shit how painfully slow can it be!
It feels like it's Java running in a Windows 95 VM running on a dead cow that was revived against its own will by a Cortana ghost that pretends to be GDPR-compliant.7 -
Who the fuck at Microsoft decided to put python on their store? I don’t care if it’s on the store. What I do give many shits about is that I spent 20 minutes uninstalling and reinstalling and reconfiguring my fucking PATH because the python & python3 commands did not work but instead SENT ME TO THE FUCKING STORE PAGE FOR PYTHON 3.7
THEN I FIND OUT ITS NOT A PROBLEM WITH THE PATH MICROSOFT PURPOSELY CREATED ALIASES FOR BOTH COMMANDS SO THEY HAVE TO SEND YOU TO THE STORE PAGE WHEN YOU TYPE python OR python3 INTO THE CMD OR POWERSHELL.
I turned it off after finding that out, but I’m still furious. Fuck Windows.22 -
Built a PowerShell script to keep my status “Active” all day. Appearing productive is what’s important!19
-
For all the hate going around about microsoft i just wanted to list things microsoft has done a great job at (imo of course):
windows 10
powershell
microsoft office
minecraft
xbox
microsoft edge
probably more so don't hate for the hell of it.20 -
Powershell should die.
I have a simple bash script I made that allows me to download almost any video from the internet. Works great and took me only a few minutes to make.
The only issue is it bash meaning Windows doesn't run it natively. I am not able to install linux Subsystem or bash, etc on the server.
So I decided to rewrite it in powershell thinking it should be Okay and I have never struggled with so much retardedness in my life. After 40+ tabs in chrome and a massive headache, it finally works.
Microsoft should kill powershell entirely and rethink their scripting language.
Also VBA should have died 10 years ago.16 -
Trying to explain functions to my coworker and why they should be used even if powershell scrips don't 'need' functions
I've explained it 5 different ways across multiple meetings when they've gotten stuck on something.
At this point I've decided 1. I don't have the patience or brains to be a teacher..., 2. I'm going to have to review every script they ever fucking write, 3. I'm never letting them work on anything critical or time sensitive for big clients. (Small clients ehhh) I'll fight my boss to avoid that headache lol7 -
Me: I need an SSL certificate.
Support: No problem. Just fire up your command line and generate one via OpenSSL.
Me: I'm on Windows.
Support: Ok, so what you do is code a Linux command line from scratch that will run in Powershell. Next, compile OpenSSL from your favorite of 60,000 versions available. Now, just fire it up and you're all set.
Me: Goodbye everything I've ever enjoyed doing in my free time.16 -
I wanted my colleague Mathew to write a background process on running powershell scripts at random intervals, based on input files...Guess we will call it Matt Daemon1
-
Should’ve posted this after it happened, but it requires a bit of background anyway.
There’s this guy that oversees our OpenStack environment. My team often make jokes and groan about him in private because he’s so overbearing. A few months back, he had to take us to our data center to show us our new racks, and he kept saying stupid stuff like “you break this and it costs me $30,000” as if he owns everything. He’s just... one of THOSE people. Always speaks in such a condescending way. We make jokes that he is our “best friend”.
Our company is shifting most of our products to the cloud in response to the coronavirus (trying to make it an opportunity for “innovation”). This has involved some structural and responsibility changes in our department, and long story short, I’m now heading the OpenStack environment alongside other projects.
This means going through grueling 1-on-1 meetings with our “best friend”. It’s not too bad, I can be pretty patient with people, so I didn’t mind too much at first. Then a few things happened.
1. He sent a shared folder that he owned containing info related to the environments. Several documents were outdated and incomplete, so I downloaded them, corrected them, and then uploaded the documents to my teams file share, as I was supposed to since we now own the projects.
2. Several files were missing, and when I asked about them, he said “Oh, did you refresh the browser?”. I told him no, that I downloaded them locally and republished them to my teams server, because he was supposed to hand everything off to us at once. He says “Well, silly, how are you going to get updates if you’re looking at them locally?” and kind of chuckles at me like I’m stupid.
3. He insists on training me how to remote into one of the servers to check on cluster space, which in itself is fine. I understand others wanting to make sure things will be done right by the people who come after them. But he tells me to download SuperPutty. I tell him, “oh no, that’s alright. I don’t need putty”. He says “oh cool, what tool do you use for ssh?”. I answer him “Just Git. If I want to I can use a CentOs bash terminal too, because we have WSL installed”. He responds “You can’t ssh through Git”.
I was actually a little shocked. I didn’t know if he was serious or not so I was silent for a few seconds before hesitantly saying “yes you can”. He says “this is news to me” and I so I tell him “every single one of our build jobs fetches code from Git with ssh” and he seemed genuinely shocked and surprised by that.... so then it occurs to me to show him that you can ssh in Powershell and that REALLY blew his mind. He would not shut up about it for several minutes. I was amused until it just got annoying.
Needless to say, my team had been previously teasing me about having to work with him, so they found it hilarious when I told them afterwards.8 -
Thank you Syncex for one of the best powershell scripts ever. This literally sped up my laptop and surface :34
-
Fucking powershell.
Just make a fucking api call, and shove my json into a damn csv.
How fucking hard do you have to be 🤯5 -
I finally fucking made it!
Or well, I had a thorough kick in my behind and things kinda fell into place in the end :-D
I dropped out of my non-tech education way too late and almost a decade ago. While I was busy nagging myself about shit, a friend of mine got me an interview for a tech support position and I nailed it, I've been messing with computers since '95 so it comes easy.
For a while I just went with it, started feeling better about myself, moved up from part time to semi to full time, started getting responsibilities. During my time I have had responsibility for every piece of hardware or software we had to deal with. I brushed up documentation, streamlined processes, handled big projects and then passed it on to 'juniors' - people pass through support departments fast I guess.
Anyway, I picked up rexx, PowerShell and brushed up on bash and windows shell scripting so when it felt like there wasn't much left I wanted to optimize that I could easily do with scripting I asked my boss for a programming course and free hands to use it to optimize workflows.
So after talking to programmer friends, you guys and doing some research I settled on C# for it's broad application spectrum and ease of entry.
Some years have passed since. A colleague and I built an application to act as portal for optimizations and went on to automate AD management, varius ssh/ftp jobs and backend jobs with high manual failure rate, hell, towards the end I turned in a hobby project that earned myself in 10 times in saved hours across the organization. I felt pretty good about my skills and decided I'd start looking for something with some more challenge.
A year passed with not much action, in part because I got comfy and didn't send out many applications. Then budget cuts happened half a year ago and our Branch's IT got cut bad - myself included.
I got an outplacement thing with some consultant firm as part of the goodbye package and that was just hold - got control of my CV, hit LinkedIn and got absolutely swarmed by recruiters and companies looking for developers!
So here I am today, working on an AspX webapp with C# backend, living the hell of a codebase left behind by someone with no wish to document or follow any kind of coding standards and you know what? I absolutely fucking love it!
So if you're out there and in doubt, do some competence mapping, find a nice CV template, update your LinkedIn - lots of sources for that available and go search, the truth is out there! -
Here's one that involves Windows, Linux (at the same time!), WInZip, Python, Lua and Minecraft, sort of.
So, when I get depressed I often find that old 2011 Minecraft videos help a lot from the nostalgia boost. If its stupid, but it works, it isn't stupid. Anyways, I was thinking about how much fun it must have been to just fuck around with code and make something like Minecraft. Naturally, I got a huge code boner and really wanted to do something I hadn't in a while: binding c to a higher level language.
This time around, I wanted to try Python. C + Python seems like a good pair. I watched a tutorial and it seemed pretty interesting and simple enough but I remembered that I actually like Lua a lot better than Python, so I went to the download page of Lua.
The download is a tar.gz so I let out a sigh and start typing "WinZip" into google. But no, fuck that, I hate 3rd party decompression programs on Windows. They all just give me this eerie feeling.
"This would be so much fucking easier on Linux"...
I remember that I haven't tried the Windows Subsystem for Linux. I guess it's time, isn't it?
I read the docs of how to do it. Nice little touch, they tell you how to enable WSL from PowerShell but don't mention the GUI way to do it. It's genuinely a nice touch.
So I get everything installed and go to the app store to choose a distro. I want Ubuntu. I click the Install button...
...
... "Something unexpected happened"
Windows and their fucking useless error messages. Jesus, okay. I restart computer. Same issue. I update Windows. Same thing. Uninstall WSL. Reboot. Install WSL. Reboot. Same thing. HOLY SHIT.
Went to bed. Woke up. Tried to install Ubuntu.
"Yea ok lul i'll work this time for no reason"
Finally unzipped Lua.4 -
I've never used Windows in my day-to-day life. No kidding.
When I got my father's first computer, I used an old distribution called BBC Linux. I didn't have any computer knowledge, it was my first contact with a computer, so I went to a friend's house and asked for a CD to install on my computer. I don't know if this friend ended up making a "gotcha" and thought I'd give up, but I just read the manuals and fell in love. That was year 2000.
Then I used Conectiva Linux, then I went to Red Hat 9, then Slackware, then in 2007 I started using Solaris. And I stayed on Solaris (Solaris 10, Solaris Nevada and OpenSolaris) until 2011.
In 2011 I bought a Mac. I stayed at Apple until 2020, when I couldn't stand Apple forcing me to buy new computers (I still don't understand how a 2011 iMac, i5 (4 Hyper Thread cores) with 16GB of RAM, 1TB SSD only runs up to High Sierra).
Then I bought a Dell. It came with Windows 10, the first thing I did was install WSL2. I could not stand it, the system is bad, sorry. I installed OpenSuse and have been using it for two years.
It's just that every day someone tells me "how can you use this"? "There is no alternative to Windows, do you want to be different?"
I know that my story was the reverse of the "mainstream", so I'm going to talk about my vision of Windows, that in my brain it is actually the "alternative".
- Having a file explorer without "tabs" in 2022 is unthinkable for me.
- I love terminal. And the Windows terminal is very limited. "ps ... | awk ... | xargs ..." is a must for me. "find ./ -name '...' -exec ..."... these things on Windows are totally "different" and have the "powershell way" while all other operating systems keep the same form. And cygwin is not an option. As Wine for serious work is also not.
- Dragging a file into the terminal, and having it write its path, is so natural, that when Windows didn't do it, I was dismayed.
- I've always used StarOffice, OpenOffice and now LibreOffice. All the people in my story received my documents and reports as a PDF and no one complained. Until a coworker saw me editing in LibreOffice and said "oh I want it in word format". As long as he didn't know, everything was fine, right?
- Windows is paid. And is there advertising? I don't understand. And I refuse. If you want to display advertising, then excuse me. I have no problem paying, I'm not an opensource shiite. It's just that paying and not working bothers me much more than an opensource that I can fix or expect a fix knowing the good will of the people involved.
- Hyper-V is a joke. QEMU/KVM is better, and Bhyve on FreeBSD which is a very young project, is already a million times better than Hyper-V.
- Developing in C/C++ for Windows is only possible in two ways: Either you've always lived in Windows and your brain is conditioned, or you compile with MSYS2 (CLang or GCC).
- There is no significant evolution of the windows desktop since 95.
- Multiple workspace support with multiple monitors, not ready. It's another joke.
- REGEDIT does not need any comment.
- The system loses performance over time. I still don't know how Windows achieves this.
- I've seen people complain about desktop fragmentation on Unix and Linux. Many DEs end up leaving applications with different themes (like running a Qt application in Gnome and GTK in KDE), but to be quite honest, the lack of Windows standard bothered me much more. Even Microsoft's own software is completely different: Control Panel, Calculator, Paint and Office, To-Do, and Settings, have horrible style differences and look-and-feel fragmentation.
- Dark mode has not been implemented. It's another joke. Many applications are white while everything else is dark. Sorry, even on Linux which is a mess, this has been resolved. And well resolved.
- NTFS? Serious?
- C:, D:.. It doesn't convince me since DOS.
- Bloatware.
- News "biased" in the search bar is a lack of respect for those who use the computer to work.
And that. For me, Windows is the alternative operating system. I can't take Windows seriously, for me it's an experimental one like Haiku or ReactOS. It's good to play.
About market share, it doesn't convince me to use it. But convinces me to sell. I've always developed applications to run on Windows. And when I need it, I turn on a VM to compile the project. But in everyday life? Impractical.15 -
tldr; Windows security sucks. You as a org-admin cant do anything about it. Encrypt your device. Disable USB Live boot in the bios and protect it with a STRONG password.
First of i just want to say that i DO NOT want to start the good ol' Linux VS Windows debate. I'm just ranting about Windows Security here...
Second, here's why i did all of this. I did all of this mainly becuase i wanted to install some programs on my laptop but also to prove that you can't lock down a Windows pc. I don't recomend doing this since this is against the contract i signed.
So when i got my Laptop from my school i wanted to install some programs on it, sush as VS Code and Spotify. They were not avalible in the 'Software Center' so i had to find another way. Since this was when we still used Windows 7 it was quite easy to turn sticky keys in to a command prompt. I did it this way (https://github.com/olback/...). I decided to write a tutorial while i was at it becuase i didn't find any online using this exact method. I couldn't boot from a USB cause it's disabled in the bios wich is protected by a password. Okey, Sticky keys are now CMD. So let's spam SHIFT 5 times before i log in? Yeah, thanks for the command promt. Running 'whoami' returned 'NT SYSTEM'. Apparantly NT System has domain administator rights wich allowed me to make me an Administrator on the machine. So i installed Everything i wanted, Everything was fine untill it was time to migrate to a new domain. It failed of course. So i handed my Laptop to the IT retards (No offense to people working in IT and managing orgs) and got it back the day after, With Windows 10. Windows 10 is not really a problem, i don't mind it. The thing is, i can't use any of the usual Sticky keys to CMD methods since they're all fixed in W10. So what did i do? Moved the Laptop disk to my main PC and copied cmd.exe to sethc.exe. And there we go again. CMD running as NT System on Windows 10. Made myself admin again, installed Everything i needed. Then i wanted to change my wallpaper and lockscreen, had to turn to PowerShell for this since ALL settings are managed by my School. After some messing arround everything is as i want it now.
'Oh this isnt a problem bla bla bla'. Yes, this is a problem. If someone gets physical access your PC/Laptop they can gain access to Everything on it. They can change your password on it since the command promt is running as NT SYSTEM. So please, protect your data and other private information you have on your pc. Encypt your machine and disable USB Live boot.
Have a good wekend!
*With exceptions for spelling errors and horrible grammar.4 -
I think I want to quit.
I know it’s a bit of an inconvenient time with there being corona around but everything was okay up till January. I’m a junior even though I shouldn’t be. Since my manager told me and my team leader senior in my review “maybe you two should switch jobs” things have been going downhill. I think the team lead had it out for me and didn’t put me on a new project, I’ve been left with doing stupid basic shit like updating text on websites in a cms and doing fuck all and then there’s also another guy that was basically harassing me trying to put me in my place any time I was doing better than him and literally both of them been like that ... and now that I’m working from home it’s even worse. I don’t have any kind of assurance that everything okay and actually I think I’m being framed as welll since I found keyloggers on my work laptop and deleted cleaned shit up the past two weeks and changed my WiFi security as there were like 5 unknown devices on our network so yeah .. I’ve been framed and they made it out like I put a powershell script on one of the servers and it crashed a Porsche website for 8 h and all kinds of bullshit - this was yday. On Tuesday they logged me out of everything like changed the password for work vpn and kicked me out of slack and Microsoft teams for over 2 hours till the end of shift and two managers weren’t answering their phone and then next day my manager called and apologised that saying that he “accidentally” did that to me along with 15 people they let go from the company....
I’m seriously thinking of quitting being removed from team group for a moment , not being on a project and people literally trying to put me down after I know I’m genuinely smarter than them and if I had over 10 years experience like those on my team (I have 1) I’d be far higher up and better
They can genuinely just go fuck themseves !!!! And here I was going to work over weekend on something! No fucking way I just wanna quit or give in my notice but because of corona I’m divided7 -
Network Security at it's best at my school.
So firstly our school has only one wifi AP in the whole building and you can only access Internet from there or their PCs which have just like the AP restricted internet with mc afee Webgateway even though they didn't even restrict shuting down computers remotely with shutdown -i.
The next stupid thing is cmd is disabled but powershell isn't and you can execute cmd commands with batch files.
But back to internet access: the proxy with Mcafee is permanently added in these PCs and you don't havs admin rights to change them.
Although this can be bypassed by basically everone because everyone knows one or two teacher accounts, its still restricted right.
So I thought I could try to get around. My first first few tries failed until I found out that they apparently have a mac adress wthitelist for their lan.
Then I just copied a mac adress of one of their ARM terminals pc and set up a raspberry pi with a mac change at startup.
Finally I got an Ip with normal DHCP and internet but port 80 was blocked in contrast to others like 443. So I set up an tcp openvpn server on port 443 elsewhere on a server to mimic ssl traffic.
Then I set up my raspberry pi to change mac, connect to this vpn at startup and provide a wifi ap with an own ip address range and internet over vpn.
As a little extra feature I also added a script for it to act as Spotify connect speaker.
So basically I now have a raspberry pi which I can plugin into power and Ethernet and an aux cable of the always-on-speakers in every room.
My own portable 10mbit/s unrestricted AP with spotify connect speaker.
Last but not least I learnt very many things about networks, vpns and so on while exploiting my schools security as a 16 year old.8 -
Navigating Directories with PowerShell, coursemates staring and thinking I'm a badass hacker. Their reaction when a directory not found generates five lines of bright red jargonized line in the console and I just nod slowly as if I'm understanding something deep 😂😂4
-
You know the shit has really hit the fan, when the IT Admin in the company doesn't know what execution policy in PowerShell, means7
-
lol I love playing tricks set a script to automatically lock account that is after its logged out jajajajajaja I love being an admin7
-
"curl : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again."
Why the flying fuck do i have to configure some BS in internet explorer to use curl in Powershell? I thought IE was finaly dying, but nope!4 -
TIL I can run Linux commands in Powershell. I don't know what I did. I didn't realize that I was in Powershell instead of WSL. But only to a few commands though. Can't run uname, free, top or other system like commands so far. Must be part of some Windows 10 update that I missed.8
-
Been working in Linux server for a while, doing devOps and basic task automation with bash.
Today I have to write some .bat task for backup and moving files in Windows first time against .bat . What the hell was this people thinking when they made the .bat sintax is just awful. I understand is old but why. And tried also powershell still crap.8 -
Microsoft owns github
Microsoft owns windows
Microsoft owns powershell
Why then, why exactly, is it so fucking hard to get ssh private keys for github, up and running on windows powershell.
I tried to change permissions on files but then it broke the git-bash implementation 😭.
Fuck it !! 😭😭9 -
I usually start on stuff but get about 90-95% done and find that last 5-10% requires as much (time|energy) as the rest of the project.
Bloatware removal script in powershell for factory imaged systems currently.
Nearing completion now but always a few more features and testing rounds to go...
Working gui now but getting good UX takes time with winforms.3 -
First rant, technically a sysadmin but getting into the nitty-gritty of programming with some things to improve my job (and hopefully moving into something more technical).
Have been doing a paid internship at my utility company. I do patch management with SCCM and sometimes the updates break. I've been using Powershell to reset the Windows update cache to make the computers work again. Unfortunately, this sometimes involves logging into machines to do some manual work and I have to notify users before I log in if they're already logged in.
Scripts can be run silently but I've spent a few weeks trying to automatically retry Software Center updates with Powershell … before realizing just today that the system center action "Application Deployment Evaluation Cycle" does indeed do the thing I've been attempting to do with Powershell for weeks now.
Wish me luck as I automate that part of the process and completely automate the sole job they gave me to do. Don't tell on me!5 -
so after several hours of irritated detective work, I've finally found out what is the thing that periodically, every about 10-15 seconds, starts two PowerShell processes which run for about a second or two and during that time take about 20% of my CPU capacity...
They're being launched from a commandline, to do GetPackages with name of OmenLightStudio, and the result is then piped into find.exe to find InstallLocation part.
...for whatever reason.
and this is done every 10 seconds by... *drumroll*
HP SYSTEM OPTIMIZER.
GOD. FUCKING. DAMMIT. YOU. MORONS.
...now only to find how the fuck do I uninstall that, since it's some plugin-ish kind of stuff for Omen Studio, and I can't find uninstall for it anywhere in the system nor Omen Studio itself...10 -
So what do you guys do when you can't sleep?
I'm currently writing Powershell scripts to manage my companies office 365 because I dislike the web interface.3 -
Azure portal is all I hate about Windows in a single, convenient, accessible web page.
Worst part being there are some parts of my work requiring me to deal with it on a daily basis as there is no PowerShell equivalent command, nor any API I could use, to perform some tasks.3 -
Me: *closes powershell*
VSCode: Our deluxe Integrated Powershell ™ closed unexpectedly. It must be an error. Do you want to open it again?
Me: NO7 -
Why Microsoft, why.
We have our own Powershell Scripts to delete unwanted apps that are installed from Microsoft on Windows 10, like XBOX app.
I installed a new workstation for a new worker and deleted the apps with the scripts.
The Day the new worker arrived, it was my task to give him an introduction, what Programs we are using and so on.
Worker logs into machine and opens Startmenu.
All Apps that I have deleted with the scripts are back!
Why, you ask. Because Microsoft made it so, that when a new user logs in on a machine he has never been before, every single apps that has been deleted is reinstalled.
I'm searching for a method to shut this down for good.
Help is much appreciated.5 -
I'm forced by my job to use this fucking unusable piece of horse shit also know as a Windows operating system.
And it's not only that I have experienced every fucking corner case bug that is possible to occur in our universe.
Not only that that for last 2 years I seen more blue screen than blue sky.
Not only that forced updates fucked my schedules so many times that now I'm really *afraid* to turn off my computer off because I have zero guarantee that I will be able to restart it in a reasonable amount of time.
No, neither of those broke me.
The thing that kills me everyday is, piece by piece ...
WHY THE FUCK THERE IS NO SINGLE, USEABLE, SANE TERMINAL EMULATOR ON WINDOWS
I JUST WANT TO TYPE SOME COMMANDS, COPY/PASTE TEXT AND SCROLL
IS IT TO MUCH ?????
FUCK CMD
FUCK POWERSHELL
FUCK WSL
FUCK ALL THOSE WANKY THIRD-PARTY EMULATORS
FUCK EVERY-COMMAND-LINE-REALATED THING ON WINDOWS
FUCKING USLESS SHIT
CANT EVEN DO SOME SSH COPY/PASTE SHIT
WITHOUT SOME WEIRD CHARACTERS POPING OUT EVERYWHERE.
AND FUCK THAT EVERY ONE OF THOSE MUST HAVE TOTTALY DIFFERENT SET OF KEY SHORTCUTS
AND THAT FUCKING BELL
WHY WOULD YOU EVEN PUT A FUCKING BELL SOUND AS DEFAULT SETTING ??
GO TO HELL MICROSOFT
I WANT MY LINUX BACK7 -
"Ralph" has been working on a process that updates a field in a SharePoint list and bellying aching for almost a month. Couldn't use the C# client, too hard...tried to use the SharePoint REST entry point, using C# too complex...Javascript also was overly complex. Tried to use PowerShell, that worked but could only run on the SharePoint Server and it didn't have access to the 3rd party system.
In our stand up this morning, again, he was belly aching he is still not done because of the complexity of SharePoint.
I thought "Good lord...what the frack is the problem? Surely other devs in the world aren't having this much of a problem."
Fire up google...search for an example...copy the MSDN C# example...run it...tada...updated the SharePoint list just fine. Maybe 15 minutes of effort (< 20 lines of mostly copy+pasted code).
Next stand up, I'm contemplating calling him out on the BS, but I suspect he had working code for a while. Wouldn't be the first time he has dragged his ass working on a project until folks get fed up waiting and he has an "intellectual breakthrough" and brags how all his effort was worth the time. Similar to the firefighter who starts fires just so he can 'be the hero'.1 -
Switched back to windows because I needed IIS for work and I did miss having a touch screen (could not get driver working on Linux).
A few gripes.
I mean, the standard "oh great, half a day downloading and updating my machine" applies.
The thing I forgot about Windows is that after everything I do it wants to restart. Updating itself forced the computer to restart several times, wtf.
Powershell (ironically) holds a shadow of bash's power
So many "power user" actions are done with a gui, dear lord give me a terminal command and a man page any day over the convoluted way to do some actions. Changing permissions for IIS was several layers of gui dialogues, where it would be a couple of commands in bash.
Sorry to be unoriginal and moan about an OS, as an end user windows is great and a lot more streamlined and arguably prettier, but as a programmer it doesn't make life half as easy as the realm of *nix1 -
So i recently had to go back to windows while testing the notification feature in devRantron. Doing this only reminded me why i switched to linux 5 months ago. After having to restart my pc, reinstall c++ build tools multiple times, regedit and switching back and forth from powershell and cmd i managed to install a NPM package. Linux is <39
-
That's it. I'm inventing a new position :
"Dev support".
Why do people ask me "Hey, visual studio has a pop up saying I'm missing a .net4.6 framework. What should I do ?"
Or "Hey powershell says script execution is disabled, what should I do ?"
Google motherfucker, do you use it ?!4 -
During Summer school (yeah I'm an idiot) I disabled this LanSchool Helper thing with a few lines of powershell script(fuck windows, havent used it since I was like 15) that allowed the teacher to see what the students were doing on their computers. Instead of finishing my failing courses I was then able to spend the rest of my time that Summer honing my programming skills.
I graduated a year late, but had easily become the best programmer that school district had ever seen 😎 And by impressing the kids sitting next to me while I browsed docs, blogs, stack overflow, and youtube - rose to be a Summer school legend.
I am a dev badass. I am legend. 😂11 -
Windows File Explorer is the epitome of everything bad about Microsoft. It's shitty proprietary software that treats the user like a baby and hides to complex parts of the system for them, while also managing to be so hideously designed that there are entire books about using it.
Thankfully, I have enough technical knowledge to be able to use PowerShell, even though that's shitty too3 -
Adventures with house IT
I'm currently experimenting with PowerShell but my scripts won't run even though I've got every local permission. The error message indicates it's a GPO problem.
"No problem" le me thinks and calls IT hotline.
After 2 incompetent and unprofessional technicians i've still got no solution. I'm waiting for the second tech to call back because he "needed some time to get to know PowerShell" (he is a trained and certified SysAdmin).
During my call he couldn't decide if it was a GPO problem or not.
And this is just one story of their incompetence...8 -
FUCK WINDOWS FUCK NODEJS FUCK ANGULAR FUCK VISUAL STUDIO FUCK POWERSHELL FUCK ALL THAT FUCKIN CRAP WHY THE FUCKIN HELL IT SHOULD BE THAT HARD TO INSTALL SOME SHIT AND START WORKING LIKE A NORMAL PERSON WOULD DO JESUS FUCKIN CHRIST I FUCKIN HATE THAT OS FUCK THIS SHIT10
-
I remember the first time working with a Windows 2012 R2 server.
Of some reason I couldn't open Windows Powershell as admin and asked another Dev what to do. His response? Try restarting the server.
Can you imagine the look on my face if I told you I only worked on Linux until that point. How can you seriously make a server OS that needs restarting at all? Is it just me or is that just fucking stupid?1 -
Microsoft released PowerShell for Linux. Why? They released IE for OS X way back and we all know how that turned out....10
-
Convert images to ASCII pictures in PowerShell
https://github.com/off-world/...
sharing my latest side project here as I thought some of you guys maybe will like it.1 -
I've always wondered why Devs who are using windows seem to be allergic to any command line.
I've seen people install xrdp on Linux machines so they can remote desktop onto them, just to open up a terminal window.
But I think I now understand why.
Terminals on windows just suck.
And I'm not talking about CMD and powershell, I mean the terminal emulators.
The windows one is just awful, and even PuTTY is just annoying to use.
Yes it gets the job done but why do I have to click 4 times in some UI settings to change the font size? Just give me a zoom hotkey what the hell?
And the default colour scheme of putty always makes me want to shoot myself.20 -
I FUCKING HATE IT WHEN I HAVE TO BUILD SOMETHING FROM SOURCE!!!!
So I wanted to install a package with pip. Shouldn't be that difficult, right? RIGHT? Lmao
Things I encountered on this adventure in no particular order:
- multiple undocumented dependencies, only explained on stackoverflow or some github issues
- inconsistent and outdated documentation spread over multiple pages on multiple websites
- Python version can't be too old or too new
- other external software version incompatibilities
- Build process that takes several minutes just to fail, then try again and fail with exactly the same outcome after a few minutes
- fucking SVN is needed?!?!?!
- VS Code is needed for completely manual build ????
- cmd/powershell incompatibilites
- required reboots
At some point I just gave up... Now I don't even remember what I crap I installed that I don't need anymore.
Please for the love of god provide prebuild packages or at least a very SIMPLE build process -_-8 -
One thing my dev years have showed me through various systems:
The world is held together by masses of scripts. And most of them are horribly bad, unmaintainable, extremely complex and usually not replaced on requirement changes, but extended by other terrible scripts to get the desired behaviour.
Windows is based on tons of shitty batch scripts, powershell madness, WSH bullshit and VBS absurdity.
GNU/Linux is build upon trillions of incomprehensible shell scripts, heaps of python gizmo and perl mysteries.
Every complex system I've seen uses batch or shell scripts to fire up its runtime.
And it doesn't seem to get any better, so let's face it, we're doomed.3 -
Just found out that Visual Studio actually has the equivalent of Swift playgrounds - just go to View - Other Windows - C# Interactive (or F#, Python or PowerShell). My life is now complete.
-
Powershell. Using classes. Can't create class libraries using regular .ps1 files (this way this **sort** of work). Using modules then. Can't easily refresh modules cache after any change to a class. Need restarting powrshell each time. Looking for more information. The issue is open since 2016 (just after the release of PS 5 that introduced classes). Once again, a Microsoft product turns out to be shiny at the beginning, but rusty when you go beyond the surface. Classes seem to be second class citizens in powershell. I feel frustrated and I would like to put pressure on microsoft but nobody seems to care. I'm stuck.3
-
So today I started working on a code base someone else wrote and stubled across this and thought it was worth sharing.
Why somebody would be doing something like this is beyond my understanding.
Not commenting on the empty catch block keep in mind the whole snippet has nothing to do with rest of the code...
WHY!!!!!?!?!?!?!13 -
its day 4 of updating documentation and consolidating data.
The webclient has broken on average 4 times a day.
The database took 20+ seconds on updating a password entry.
I explained to my boss the real cost of interrupting my attention with these pauses. I figure it's caused my productivity to go from record high last week to being literally losing about 4 hours a day lost, plus extra time in having to go back through and verify things worked.
The technicians and developers who are working on fixing the database system are apparently quitting left right and center; their company acquired it awhile back, so they don't actually have native developers on it. Yet they still are pushing out new integration features rather than fixing anything.
Yesterday, one of the other people on the documentation project lost half a days work due to the angular updating the local cache, but it never reaching the backend. He came back from lunch, reopened his browser, and all his work was gone. (at least thats what we think happened). So we are hard resetting the program every 10 minutes or so just to make sure it is updating the backend.
The good news is that when it is done, we theoretically will be able to use this to cut back onboarding time and update times by about half, and it'll mean our new nano-server deployment project should be able to spin out with standards that can be referenced properly by everyone, not just the guy with the powershell script that he tinkered with for a particular project and never told anyone else what he did.
Theoretically. -
Realised I never post on devrant. Maybe I should. Todays tame rant
Never trust intune when it says a group policy has been successfully applied and had to use powershell instead. What is the point of you settings catalog if you lie to my face.
Gaslighting buggy Crap making me look bad.
Have you disabled autoplay yes on these devices.
Looks at fully synced device dafuq7 -
Training a developer... After one year, he still doesn't understand "Update-Database"
Create a powershell command and just tell him to click on it after every git pull -
Still find it amazing how archaic command prompt is, why do we still need to manually select which drive we want before cd'ing into the directory...
Why can't we just do cd D:/foo/bar, I understand you want us to use PowerShell Microsoft but you are the company that still ships internet explorer so please at least bring it up to standard a little -,-2 -
I don't get why certain people always complain about the OS they have to use at work... I get, that as a person who really uses aspects of the OS like a sysadmin or something like that, has valid points... but no... as a projectmanager or productmanager, whos tools are all browserbased... "in Windows I know where all the things are..." is not a valid excuse to hate on the OS...
What do you want to do? Change system settings everyday? Use PowerShell to create your Jira tickets?8 -
Security is a joke. And people don't seem to get it. Especially Data mungers.
I've spent about half an hour trying to work out how to securely connect to power BI using PowerShell in a renewable manner for unattended access later on.
Every single example I've found seems to involve you storing $user and $password variables inside your script. If I'm lucky, they're going to pass them through ConvertTo-SecureString. And nobody talks about securely storing AD auth tokens, or using the Windows Credential Manager.
I know it's possible, but it's going to take me ages to work out how from all sorts of disparate sources...16 -
I've been BSing my skillset for so long to myself, it's a veritable toolbox of mixed knowledge but no complete sets...
I wonder if it's too late for me to catch up or if I will ever actually complete any learning...
I am yet to finish learning
Html
CSS
PHP
Ruby
C#
ASM I can do i386 but not x86
VB
Pascal if you can believe
C
C++
Java
JS
Python
Powershell
Bash
My main skill is basically just remembering anything I do, including code syntax and example code fragments well enough to quote at people which makes me a lazy learner. -
Do you know JavaScript ? Can you remember that == should be written like -eq ?
GREAT! You now know powershell.1 -
So with my current windows heavy workload it is with a heavy heart that I commit to learning powershell. Wish me luck6
-
I have to say that I'm a little pissed by all this windows bashing... Can't understand all that Linux is the only OS you should use...
Have you ever tried to Programm C# without windows?!? It's really quirky and shitty if you can't use Visual Studio.
Have you ever tried to do something according to sound and producing... So you probably known something about Logic and for this case MacOS seems to be best.
I think Windows improved a lot over the time and they have done some nice things with the "new" powershell.
Don't get me wrong Linux is quite nice and you can get distros for nearly every use case but if you want your software to run by most of the people with a computer you have to develop for windows...16 -
Why people uses Python for OS scripting? What’s the point in forcing me to download a proper interpreter to run a script when the same result can be achieved with a more portable and cleaner Bash/PowerShell script?!?!24
-
How much do you guys use CLI and why?
I did learn a bit of terminal as well as cmd as a hobby, but now I don't use cli that much anymore, maybe sometimes for git or fixing some issues... perhaps that's because:
1. I use windows
2. I am a .Net developer25 -
what's my next language to learn? So far I only know powershell. I don't need it for any big project, just some small games to learn the language. I'm thinking of python or c#.11
-
I decided to format party my desktop since I'm working at home every day (got a 1TB ssd to replace 150gb OS drive).
First fresh Windows install in 4 years. I had forgotten how much fuckery windows puts you through to do some basic things. I can imagine being a newbie hobbiest programmer and having to go through this stuff?
So I just embarrassingly spent 15 minutes reading and troubleshooting why you can't run a python script inside of powershell. PS just blips for a moment leaving you wondering if the script executed. So I created a test script to use a logging file handler to see if it actually ran. No.
Turns out you have to register the .py extension by appending it to your PATHEXT environment variable. Before that I was going to add it to the PS profile, but realized it takes more than a quick moment to find out which scope of PS profile is appropriate to create, and on top of that, you have to enable script execution in PS (which I recall is easy, but didn't do yet).
Tangentially, I solved an ssh issue days ago. I would tell you what it was, but I seem to have mentally blocked it due to trauma.
For real Microsoft. Yes powershell has some great advancements--my friends say so.
But this needlessly nuanced bullshit needs a little attention from you guys to save the world a shitload of time. I can only imagine what it's like for non-tech savvy people trying to learn to program and having to face this stuff.
I still haven't solved the color scheme stupidity of powershell. This is 2020 ffs. Yet seems there's no clean or intuitive way to do it.
Other issues omitted for 'brevity'21 -
How the fuck does Windows not have a zip command!? I mean there's a Powershell command but it *only* took until 2016 for that to be a thing!3
-
Spent 15min automating our Spotify playlist.
Task Scheduler runs a PowerShell script at system startup and 15:00, based on the time it will either start our "daily music" or "shitty memes" playlist using the Spotify API. -
Going on a object orientated software development course today.
Ive done some, not alot, im mainly powershell fanatic since im automating alot as Server admin.
If the course is good/i enjoy developing like this, i leave the army and go for "development school" at summertime ! Super excited!!1 -
it FUCKING annoys me like hell that in the year of 2017 powershell cannot display more than 16 colors and output unicode symbols properly!
i mean.. fuck that shit!4 -
I'm a mac AND a PC! Are you? I actually quite like both of them.
My dev setup has both operating systems, with a shared mouse and keyboard (using Synergy) -> and I love it! It feels like I get the ability to do anything. There are some apps I prefer on the WIndows side and others that are fine on the mac. I use git and dropbox to share dev files between the two seamlessly.
I come from a Linux background, so I like that I can use bash on the mac, although on the PC I use Powershell mostly. I also have used the Ubuntu linux subsystem on the PC very effectively.
I was originally forced into the situation due to iPhone mobile development - now I don't mind at all!
On the mobile side I happily switch between iOS and Android all the time.
Love the way so many technologies exist to let you work across platforms so well.
Anyone else use both at the same time?10 -
!rant from a support guy
I was tasked to migrate an Exchange 2003 server (yes, those are still used) for an upcoming Office 365 deployment. There are no direct upgrade path from one another, as far as we know
My task was to export PSTs from mailboxes. Great, a native tool exist for that in 2003 (exmerge). But only for less than 2 GB mailboxes because ANSI/Unicode! Half of our mailbox busts that limit. Oh, it seems Exchange 2007 has a PowerShell command for exporting to PST as well! But pre-SP3, that command relies on a local installation of Outlook on the server (DAFUQ), and has been superseded by another "standalone" powershell command. So I install a bogus Windows 2012 server only for that purpose, with Exchange Management Tools (which, by the way, is bundled with the Exchange installation setup and REQUIRES to have IIS installed on the target machine. Also, if you install ONLY the Exchange 2007 Management Tools and wish to uninstall them afterwards, you can't because the uninstaller wants me to select an Exchange Role to remove, which are all unchecked in my tools-only setup). Never worked, and Google-fu says that the newer Exchange 2007 New-MailboxExportRequest command seems to have removed Exchange 2003 support.
So i'm back to installing a pre-SP3 Exchange 2007. Then the older Export-Mailbox powershell command whines about 64bits and 32bit incompatiblity-- actually I ***HAVE*** to have the whole OS/software stack 32bit ONLY. Don't ask me why!
Some article I found says I could fire up an XP virtual machine for that, I go for Win 7 x86. "Sorry, Microsoft Exchange won't be installed on a workstation environment because reasons." All right then, let's go for an old Windows Server 2003 x86. Have you tried to boot this up in an Hyper-V environment where mouse and keyboard support for Windows Server 2003 are apparently optional? No keyboard AND mouse events sent to the guest machine at all.
* Sigh *, let's use a Windows Server 2008, but WATCH OUT! Microsoft has discontinued x86 support on their W2008 R2 release, so non-R2 for me. Even then, mouse event wasn't sent until I installed guest additions.
After all, export-mailbox ended up working, but that costed me two days of banging my head against the wall. (Oh, and I take internal calls inbetween as well...)
And that's why I aspire to be a programmer. Thank you for nothing, Microsoft!4 -
I was pulling background data from a job in PowerShell, and it kept coming up short from the same, final section of data that I just KNEW should be there.
Fiddled with the primary application for hours... HOURS! Then, I checked the log. There it was in all its Glory, tee'd out to the log during job execution.
What. The. Shit.
So, it seems that, since I was asynchronously pulling data in a loop keyed to the job status and had inserted a little sleep statement in the wrong place, I'd been missing the last second's worth of data. You just couldn't tell most of the time.
Nice.
5 minutes later it was working fine with a new loop/control structure. Jesus.1 -
So a few weeks ago my colleague needed to generate some self signed certificates for our web application, we're working on.
I've sent him some instructions on how to do that. No big deal, few terminal commands.
The only trick was the commands were written for linux and we're using windows.
So... my colleague calls me, having some issues with certificates. He explains to me what commands he managed to execute, etc. There was also command "sudo" included.
He inputs the command to terminal and... terminal eats it?! Wtf?
So long story short he managed to install "sudo" for windows powershell terminal :D. It basically just gives you some UAC popup confirmation dialog and then executes the command.4 -
I think it'd be cool if we put together ctf events, so people could learn bash, PowerShell, etc., by solving puzzles. It'd be a nice collaboration, and people can learn at the same time.
-
Some facepalm things I've discovered recently:
- Node's require("http") doesn't work for https - you have to require("https") specifically.
- Mongofiles (command line utility for Mongo, imports files as GridFS) cannot input more than one file at a time. Regex doesn't work. [Ended up making a puny Powershell script to do it].
- Airtable doesn't let you download your attachments, even if you export a csv - it's just a url to the image on their cloud.
It's been an exhausting day.1 -
less than a week into my new job I'm already writing shell scripts and python scripts to automate my tasks
- it's a windows machine
- Cannot install anything without admin privileges
- powershell is locked, cannot run scripts
- can't even change my wallpaper without privilages
thankfully git bash for windows runs without installation
python also runs without installation4 -
I think that win devs that are scared of using a terminal are not real devs. We write structured instructions every day, a terminal is just the same. If they are scared of that they should try writing code with a mouse or devote themselves to artistic painting.
BTW PowerShell sucks for typing, and bash for windows is like a travesty shell4 -
Am I the only one who thinks cmd is better than powershell?
P.S. I do not use windows as my daily OS either, just on College pc.3 -
I cannot get my head around this comment
Does it mean write to console with "caution"? Or is it an obscure tribute to Dragonlance?5 -
Fucking remote db doesn't want to work with me and workbench. DB is on an empty test server, no firewall issues on the network, powershell on my pc says ping ok, tcp failing though, server firewall not running, server up and running.
Tried to modify network access on db configs like bind-adress, set my db user "host" value to wildcard. Now I can log in on workbench with my user, yet root somehow fails, wtf?
And of course once the connection is live, no db us visible, accessible, nothing works. I'm so frustrated. About to nuke it and restart ... again!13 -
Powershell is fucking great. Expand my shitty variable before I call the applet. Fucking call the applet and you shit yourself stupid and think the variable is now empty. Take my variable and shove it up your daft gigantic ass powershell. Fuck you.
-
Since early 2016 a LinuxDev at my work, pushed me (windows admin) right in the CentOS world. With some practise I had to build a infrastructure to deploy Ubuntu to development clients (laptops with stuff without windows) In perspective I had to migrate this infrastructure to my team (windows admins) and run it there as were this all the time our business. I loved powershell but for some reason I have had to learn Ruby, bash etc.. Now I am the first Admin with some pretty skills in Linux, my workplace comes without any version of Windows. I am flying with Debian, Ubuntu, redhat and CentOS. The finished work from past enabled my team and me to drop fully automated Linux Clients for our developers.
Well last weekend Windows 10 fuc*** up with the creators update and destroyed even my USB3 ports... I didn't even spend lot of my time playing with this machine... So my desk is now running arch.
That day my colleague thought, windows isn't my passion is thanked every week once for directing me in this pretty good world.
Today I am still the first Linux DevOps in my team, but still happy.1 -
My Linkedin feed is bombarded with .NET and C++ jobs.
I don't like C# and don't know C++.
I understand the demand for C++ but not .NET.
Every time I use C# or Powershell I feel weird and handicapped by Microstuff's prison.
Java, Python,Node.js and bash scripting feel so much better. Why there is such a demand for .NET devs?7 -
Hello sysadmins, silly question but can I consider Python as a serious alternative to powershell/bash? I have always hidden myself from learning bash considering myself not that kind of guy hacking around in Linux. Thanks in advance4
-
Christe on a bike, why would anyone sane use PowerShell? I can't even run my own fucking script, because "cannot be loaded because running scripts is disabled on this system". Even tho I used the same script file literally yesterday.
So I'm just gonna use single command to change it. Easy? Well fuck no! Because no one thought that implementing something like "sudo" would be a fantastic idea, so you have to jump between two separate instances of that piecie of shit. Not to mention it takes ages to even load it.12 -
If you use a Windows system for work and have the permissions to, I highly recommend you learn Powershell if you haven't already.
I've only started learning it a few months, but it's already improved my workflow immensely since it's a decent bit more powerful than batch scripts, but not as 'heavy handed' for small tasks as a programming language like C# feels sometimes.
I kinda regret ignoring it for so long, I noticed it installed on my high school laptop and toyed with it a bit outside of class, but then gravitated more towards python which I can't use at my current job. really wish high school me had the attention span to learn both back then.8 -
<rant class="sysadmin">
Fuck you windows, haven't touched my PC in 2 months and I boot it first had to restore basic functions after that a Windows update came that broke everything in Windows, now I'm learning PowerShell to fix my broken windows and to install updates in the hope I get a working installation back. -
I hate that when developing on Windows I need like four different terminals. CMD, MINGW64/Cygwin/MSYS2, PowerShell. Each one has different functionality:
CMD - basic Windows commands
MINGW64 - emulates Linux terminal with frequent Linux commands and great support for Git
Powershell - access Windows COM, .NET etc.
Now there are solutions that attempt to solve this like Cmder (which is just more user-friendly ConEmu). These are console emulators which wrap all these in one window (with multiple tabs). But they are slow as hell. I have to wait like 10 seconds each time I start a terminal in Cmder, because the emulators need to run some huge startup scripts. But I just need to run one command from this one freaking folder!
Eventually I end up having like 30 different terminal windows open, each one different in functionality and each time I need to do something I must think about which terminal I need and in which folder. Furthermore I have to think about whether to run the terminal as administrator, but I usually forget that, so I have to close the terminal and reopen as admin. Why don't you just add something like su or sudo, Microsoft?9 -
Automate this!
I'm an aspiring coder working some chappy administrator job just to pay the bills for now. My boss found out that I may actually be more computer literate than I let on.
Boss: "I want you to make X happen automatically if I click here on this spreadsheet"
Me "X!? That means processing data from 4 different spreadsheets that aren't consistently named and scraping comparison info from the fronted of the Web cms we're using"
Boss: "if you say so.. Can you do it?"
Me: "maybe.. Can I install python?"
Boss: "No..."
Me: "what about node.js or ruby?"
Boss: "no.. I don't know what you're talking about but you're not installing anything, just get it done"
Me: "Errm Ok.."
So here I am now, way over my head loving the fact that I'm unofficially a Dev and coding my first something in Powershell and vb that will be used in business :)
Sucks that I still have to keep my regular work on target whilst doing this though!2 -
Different types of comments that I know in programming languages
C, C++, Java, C# , JavaScript, Golang
// whatever and /* whatever */
CSS
/* whatever */
Python, Ruby, BASH, Powershell, perl, TCL
# whatever
Almost all markup languages
<!-- whatever -->
I was amazed by how many languages i know along the way!9 -
Linux is great
Linux can be customized
Welp, not so much. Simple things are not possible to do.
After 1H research I can't have timestamp near each line over SSH.
I'm not talking "history", i'm talking live.
basiclly I want to see timestamp on every single output line.
Basiclly this :
https://unix.stackexchange.com/ques...
But running automaticly for each command ever.
To be fair, same problem exists in PowerShell on windows
https://stackoverflow.com/questions...
And no, I don;'t want to switch to some random halfbaked teminal.31 -
Been a bash person for quite some time, but my new job has me doing a lot of windows admin. I gotta say, powershell ain't as bad as I thought it would be.
-
As promissed.
Day #1 on THE other project. Nothing fancy, just setting up my dev env. Got a decent pc with all the required network permissions. And this time I got w10 [last year I was working there on w7 pc via rdp from another w7 laptop. Dont ask...]
of course no localadmin rights to set shit up. Downloaded all the installs, found someone who has admin rights to run them. I even managed to get admin powershell!
Ran all installers, enabled long paths support, env vars, tweak here, tweak there,... Installed git bash to at least have a taste of shell. Decided to try out wsl. Enabled the feature, didnt reboot right away.
Rebooted. 2xclick on ubuntu setup and I get an error claiming wsl is not ebabled. Wtf? Did I do it wrong? I see bash command is there now so I must have done it right. After some googling I found out that even though I can enable wsl, it doesnt work on my version of windows. It's too okd they say. Yeah, tx MS, that's very intuitive and user friendly!
Allright, my hopes to habe a decent sub-os died. Git bash it is :( but I miss tmux soooo much. Then I came across smth that caught my eye. Msys2 it's called. Apparently it's based on cygwin and has a pacman package manager! ´pacman -S tmux´ -- hippee-ka-yay motherfuckers! It's not the best terminal emulation, but it works quite allright and it has tmux. And netcat!
Banished to mouseclickerland still managed to find a good enough shell. Yayy!
So there it is. My first day's ups and downs, disappointments and discoveries.
If you know a better shell I could set up on w10, please, share -
I just started a new job last week. Old-school sysadmin role for a pretty old-school company, but the pay is nice and the kids've gotta eat.
They gave me a windows laptop. I haven't used windows for work or as a daily driver since 2016, and now, a week into trying to make this machine work for me, I have the following observations to report.
WSL is nice. It's nice to have it installed(though actually installing it was an adventure unto itself), and to set alacritty to open my default user prompt straight into that is very nice. As terminal emulators are by far my most used piece of software, that's nice to have.
Command-line software management through powershell, winget, and chocolatey are also very nice.
I like the accessibility offered by autohotkey, though there is something of a learning curve on it. Once I get better with it, I suspect that what follows will be largely mitigated.
The Bad:
In general, Windows is janky. It feels like it's all kinda taped together without any particular cohesion in mind. As a desktop, it feels decidedly amateur, compared to the feature-mountain polish of MacOS, and especially compared to the flexibility and infinite possibilities of Linux.
Lots of screen real estate is wasted, with window decorations, and fonts that look terrible at smaller sizes, because the antialiasing of fonts is just terrible. Almost all the features I depend on in other desktops: ad-hoc searches and launches(alfred, rofi) are-- again --janky. They work, but they typically require more typing than alfred or rofi. I admit I haven't spent weeks on this problem yet, but I haven't found a workable solution yet with wox, hain, and keypirinha. Quick searches like what you get with alfred, alfred workflows, and the swiss army knife that is rofi, just aren't possible or reliable with the tools I've used so far, and most require some kind of indexing agent to fully function.
It beggars imagination that a desktop in which users are subjected to "default apps" that is purported to be acceptable for enterprise, professional use, does not have a default entry for text editor. I installed nvim-qt, and I want to use it to edit anything and everything I ever edit with text, but all too often, apps have hard-coded instructions to open text files with notepad.
I want to open certain URLs with firefox, certain ones with firefox developer edition, and others with vivaldi, and yet there is not an app available that I have seen yet in my searches that allows me to set this kind of configuration. I found one that's supposed to, but it just ignores everything I put into its config, and just opens MS Edge for everything. Jank.
Simple things take too long. Like the delay between when I laboriously hit ctrl-alt-del to bring up the login and when the actual text field appears, and the delay between that and when I want to start using the computer.
Changing some settings requires a reboot. Updating some software requires a reboot. Updating permissions on something sometimes requires a reboot. And those are all on top of the frequent requests to reboot for updates.
I would have thought Windows would have overcome most of the issues that create these problems, but it's just, as I said, amateur.1 -
Wanted to know: what shell do you guys use on Windows, considering cmd.exe sucks and PowerShell doesn’t even pass the Doherty Threshold? I myself use Clink with *nix binaries and WSL for what is Linux-only.21
-
I said and will say again (over and over) Microsoft WTF!
Set-CalendarProcessing -Identity $userUpn -AutomateProcessing AutoAccept -AllowConflicts $false -BookingType 'Standard' -BookingWindowInDays 365 -MaximumDurationInMinutes 1440 -AllowRecurringMeetings $true -EnforceSchedulingHorizon $false -ScheduleOnlyDuringWorkHours $false -ConflictPercentageAllowed 0 -MaximumConflictInstances 0 -ForwardRequestsToDelegates $true -DeleteAttachments $true -DeleteComments $true -RemovePrivateProperty $true -DeleteSubject $true -AddOrganizerToSubject $true -DeleteNonCalendarItems $true -TentativePendingApproval $true-EnableResponseDetails $true -OrganizerInfo $true -AllRequestOutOfPolicy $false -AllBookInPolicy $true -AllRequestInPolicy $true -RemoveOldMeetingMessages $true -AddNewRequestsTentatively $true -ProcessExternalMeetingMessages $false -RemoveForwardedMeetingNotifications $true
ok I "splatted" that command but yet does not look much better :-)
Oh how I miss my dear old VIm and SSH sessions can't wait to go back to where I belong!4 -
god its making me so angry if ppl dont know anything and dont understand anything
even removing a folder in powershell seems to be an infinitly complex task2 -
Yes this is about github, no it's not complaining about Microsoft buying it.
Have you noticed Microsoft seems to be buying/working with its competitors on something they failed to do?
MSN inferior Skype
PowerShell inferior to bash
VSTM inferior to github
And if track record continues, github might go down the shutter majorly...3 -
I know you can start a build process in the visual Studio dev console. Is there a way to start this process from a PowerShell sript? And if yes, how do I do this?
I want to/ need to learn automated testing.5 -
I made a php script to generate a powershell script that performs asset conversion. The conversion tool was designed to work via command prompt but i hate using it so i switched it up to powershell and after that i had to build a powershell script because running the shell exec function failed miserably, sad part is that just about to the end of the conversion, that ran in the background for a little over 2 days, i ran out of disk space so it stopped doing anything :( w/e i at least got what i was interested in.
-
First Rant on here!
One of the most frustrating things I have come across in PowerShell is non properly implemented ErrorAction methods in Microsoft maintained modules.
When you are attempting to write a quick script with simple yet proper error handling and Microsoft fumbles the ball at the 1 yard line! -
Finite State Machines are awesome! Resume from reboots and automation is possible even on older Powershell versions without Workflow support. Setting state and transitions resuming where it left off is huge for getting PC's set up. Unfortunately can reimage due to no vl reimaging rights but scripting is totally possible...and with it creating it's own scheduled task to run on startup it does what it needs, then reboots resumes and deletes the task when done.1
-
Any good productivity ideas for Powershell profiles?
I currently have a couple of aliases for frequent commands, Posh-Git import and bash-like tab completion.4 -
I'm genuinely contemplating changing my career to an IT support role from my current web dev endeavors.
I have become rather disinterested for quite some time with web development, I've been working with React, Angular, the regular Wordpress stuff with the theme building/modifying, headless instances, plugin development and whatnot and all of these have become more of a chore than anything else.
I'm leaning towards an IT support role as I genuinely have more interest in a user support/infrastructure support role than a developer role, the question is, is it doable ?. I know my way around Windows and Linux Servers, know LDAP, Active Directory, BASH, Powershell, Networking, can do cabling and whatnot but I don't have the experience to show off those.
Any tips would be greatly appreciated3 -
Follow-up rant to my company. Today's day is fairly good, so let's talk about infra.
We're building upon an existing open-source project which is not intended to be extended (e.g. plugins).
Our backend-team somehow hacked symfony into the app, which made the actual work a little bit less annoying. But on the other side, there is absolutely no automation. Everything is setup by hand and I need to upload my sources to my dev-server and watch what files exactly are overwritten. Because if not, I accidentally overwrite core sources which will break the whole app, no matter what. If I forget what file I wrongly overwrote, I have no choice but to setup the core from scratch and apply our sources on-top, AGAIN.
The first time setup took me almost five days.
Oh yeah and the team shares one dev server, so whenever I feel like fucking with a mate, I can easily fuck up his system, since everyone has root-rights.
We're required to use windows, but our dev is linux and I am the only knowledgable linux guy. They need cheatsheets (to be fair, I need my powershell-cheatsheet).
We market the same app with some additional functionality, but we also have clients which require their own stuff. This case has never been thought-out, since for these specific clients, we also modify some core-parts. Which makes it a real hassle to add a basic new feature to that special customer.
At least our frontend is somewhat decent. Simple and without critical thinking, but it works and is decently understandable. I'll rant about that for another day, it's still tedious.
I know I won't stay there for long since I start my own stuff, but it's sad. Nothing is perfect and they _do_ want to make it better, but it's the usual "there is no time, client first" talk. On the other hand, they tell that we should be more efficient, but there is no way to be without looking back at the fundamental structure and what takes us so long.
I don't think I am able to change anything here and as I heard from co-workers, they already look for something new.
cheers -
Spent more time than I am willing to admit debugging a Windows service, had a space between the ; and the next path on the %PATH% environmental variable. Powershell called the executable with no problem.
-
The count returns 19, my if statement is looking for anything greater than 0. Sitting here wondering why it's not working for 3 damn minutes then I remember this (https://learn.microsoft.com/en-us/...)
I can't do $variable.count > 0
I have to do $varibale.count -gt 0
: | I like powershell, it's useful for simple small things in windows
Then things like this make me wish I wasn't on windows for work
Happens every damn time, especially after working with any other language we use, i just forget PowerShell likes to be 'special' -
Hey Everyone! Just a question about C#
Does anyone know of a good learning resource for the absolute beginner of C#? It seems like the initial learning curve is absurdly steep, at least from the online training videos I've come across so far.
I'm asking about C# mostly because I have some pretty okay powershell experience and thought it would be cool to learn how to speed up my scripts dropping down to C# or .NET for performance.
Additionally, I wanted to learn a language I could use for actual app development, even though I'm a total noobstick. 😅10 -
Making a hard switch to ubuntu on my desktop at home. Getting just a teeny tiny, tad, bit: absolutely fucking livid....
Trying to learn ansible, vagrant, and docker more in depth for both work and my personal projects. All that I’ve been doing is just spinning my wheels trying to figure out the stupid fuck-mothering quirks with running this shit on Windows. Yes you absolutely can use all of these tools on a Windows box. There’s plenty of ports, patches, and workarounds. But I have spent all day trying to build a few vagrant boxes and use ansible to set them up. Simple LAMP stack boxes on CentOS7. Nothing major... unfortunately I spent like 90-110 minutes trying to figure out why virtualbox wouldn’t run properly. Dumbass me forgot that I installed Hyper-V ages ago.
O...K.... whelp... hyperv provider it is...
Luckily it only took about 15 minutes to determine that Hyperv’s networking can’t be setup from vagrant because vagrant doesn’t know how to interact with the hyperv - vswitch. So networking config is ignored and all VMs run on default switch (NAT) which is annoying but workable.
Ran into other issues trying to stay SSH’ed into the VM. PowerShell core (6) ssh’es into the box perfectly fine, but every time I opened vi to edit configs my terminal color scheme and fonts got fucked harder than a 2 dollar hooker on nickel night.
I’m a bright-green text on black background kinda guy. However the terminal kept changing to bright-red text on white background! It was like getting skull-fucked by a minotaur.
After a while I said fuck it, let’s try putty. Vagrant was using it’s own ssh keypair for the boxes, at work on my mac. Works like a dream. Putty failed me hard and shit the bed, kept getting all kinds of keypair errors. At this point I was finished spent too long trying to make shit work correctly on this jankbox. With enough time and patience I probably could’ve figured all of these problems out. I’m certain that at least 70% of them were caused by user error. I’m known by many as the walking ID-10t.
But alas, I have no time left in the day to fuck around with shit that doesn’t work immediately for morons like myself. My only hang up for the longest time with a complete switch to Linux was gaming. But with Proton and WINE I’m comfortable with giving it the ol’ college try. (Shhhh, don’t remind me I dropped out of college...
...Thrice.)
The gamble here is that I’ll give more than 2 halves of a fuck about trying to get my games working. A Study environment and materials for certs and general training won’t be getting anywhere near my full attention.
So, at long last, I hope this attempt at a full *nix switch finally sticks!!!
👾2 -
I am in school. Talking to the dean of the program he mentioned that there is a programming class that is required. Naturally I inquire about the language in the class and he responds with Python. I am ecstatic. I love Python. I eat, sleep, and breathe Python. Class comes up, and time to buy books. I am now the owner of Windows Powershell Cookbook and Learn Powershell in a Month of Lunches. :-(2
-
I just got hired at a small MSP and I’m just utterly fucking frustrated by the shitty tools and complete lack of client documentation. I want to implement tons of FOSS tools for these newbhats but they seem to like spending money on tools that only work half-assedly at best... looking at you LogMeIn!
I’ve setup Apache Guacamole a few times before and want to get each client a guac-srv setup for client’s server mgmt. or PowerShell Web Access for clients.
I want to build AWS infrastructure for clients cause we can use cloudformation or terraform to build infrastructure. But these skunk-taint licking dipsticks would rather support physical 2003 servers. If I didn’t need this job to pay my bills right now I’d be fucking gone.
But... they are very nice people.
Just technologically speaking, they eat lead paint chips for breakfast and like to piss on electric fences for the funsies. -
Ok, we were troubleshooting a network connection problem. My boss told me: use fping, a small command line utility that gives you a timestamped ping. We can then check when did the connection go down. Ok. Since I've always advocated the importance of knowing advanced scripting tools, i tried to do it with powershell. I've been playing with Test-Connection for an hour to try to get not only the timestamp when the connection is ok, but the timestamp when the connection is down. Don't want to go into details. I've just a question. A solution that allows you to do such an easy task in say 20 lines of code is the proof that the system works or that it doesn't work? To make long story short, now i'm downloading fiping.6
-
Any better terminal for vscode ? i wanna replace it with powershell !
having many errors just because my system have anaconda navigator !9 -
Just helped a colleague. She wanted a list of all files in all subdirectories of a folder. Easy enough, fired up powershell, ls'd everything into a text file in ~\Desktop, jobs done.
About 5 minutes later, she messaged me, telling me she closed the file without saving. So I went over. The file wasn't on her desktop. Quickly recreated the file - again into ~\Desktop but powershell found the file there.
"nah, doesn't matter I'll just overwrite it and be done with it." I thought.
So I did that, and the bloody file still didn't show up.
I had a look at where ~\Desktop is. It's on partition H:. WHO THE FUCK HAD THE BRILLIANT IDEA TO SET H: AS THE HOME DIRECTORY?!2 -
Hello, I have a question for anyone familiar with multithreading!
I just started working with threading for the first time, I mostly write powershell scripts 😅, I found that certain conditions make using multithreading an absolute time saver. And of course in some tasks it's not such a big deal.
I am currently working on a project that runs multiple threads and each thread might invoke one of my functions that also threads the work.
I'm a total newbhat when it comes to this stuff, but if my main process is 4 threads, and I can spin up, up-to 4 more threads to run one of my functions, does the math equate to a possible total number of threads of 16 or is it possible to have the threading go ape-shit bananas and utterly thrash the cpu with rampant threads getting created?
I've looked online and based on some of the info that I've managed to come across on my own, the answers elude towards being safe because I'm creating pools for running the threads first and the pool is responsible for maintaining min/max threads, but I can't seem to find good info on running a pool+threads inside another thread.
Just to let you in on what the function does that requires threading in the first place, I need to basically query CloudTrail based on ARN's to find events, but I can only pass a single ARN to the find-ctevent cmdlet. So I'm essentially making 1500-ish really really small calls to AWS just to get back event data for the ARN.
Serially, this takes like almost 20 mins, on my laptop using stupid settings like 24 threads, it completes in about 95seconds. On the actual server that will be running this code, I'm going to limit it to 4 threads and try to figure out a way to cache the info locally and update the info on a cron or schedule so only the initial scrape takes forever and then the updates can be done nightly or something.
thank you in advance for your help, I'm not too sure if the question is dumb but please let me know either way!8 -
After trying to print colored text to the console using a portable Python 3 interpreter on Windows I came up with a "solution". I tried pretty much everything possible (I could think of): curses couldn't be loaded, ansi didn't work and installing libraries wasn't really an option, because it's not my device. Fuck portable interpreters and have fun with the "solution".
Def color_print(text, color):
text = text.replace("\n", "\\\" \\\"")
os.system ("powershell \"$host.ui.RawUi.ForegroundColor = \\\"" + color + "\\\"; echo \\\"" + test + "\\\"; $host.ui.RawUi.ForegroundColor = \\\"Gray\\\"")
It's slow, unreadable, only works for on Windows and requires powershell and is probably the worst piece of code I ever wrote, but it works 👍.2 -
1 of the many windows rants i will make since i have to use that on work's laptop.
Let's start.
20GB for an IDE? what a joke.
Seriously MS. Are you fucking retarded? You have a fuckin retarded windows store, and i need to open it 3 times for it to be functional? Fuck you.
I want to change the default browser. YES I FUCKIN WANT TO CHANGE IT, STOP FUCKIN ASKING ME 500 TIMES IF I'M SURE ABOUT IT AND DO THE THING I TOLD YOU TO DO. Fuck you.
2GB on startup? Thanks, appreciated. Miss my 250MB on my linux laptop. FUCK YOU.
Did i fuckin tell you i want to sync the onedrive? I clicked that shit to disable it and you decided to sync the fuck out of it? Fuck you.
Candy crash and other retarded games? LOL, can't say anything. The laptop is from the job, i won't bother uninstalling that shit. In any case MS would reinstall them again. Fuck you.
Fans at 100% for no reason and battery draining like it's a cold drink that drinks someone who is thirsty? Thanks MS, very helpful. Fuck you.
Powershell? Well i leave that. Whenever i remember how slow it is i want to throw the laptop of the window. Fuck you.
Notifications? Thanks, it's very good thing to spam them for no fucking reason. Fuck you.
Skype? Who the fuck told you to install it? Fuck you.
Well i won't say anything about their fuckin updates. Every one knows how retarded and piece of shit they are.3 -
I know a lot of people aren't fans of Microsoft here, but does anyone have some extended experience with using powershell?
I've been using it for creating a script that handles quite a large set of tasks for setting up and configuring some application servers and so far I have been really digging the language. Being able to invoke the script against remote hosts in parallel like ansible has been a really cool learning experience.
Admittedly it's verbose as fuck, so getting the same thing done in something like python/perl might be like half the lines of code. And I know that some of the commands illicit a "WTF?" every now and again. But I think one of the powershell tutorials I watched early on in attempting this helped make using powershell not suck ass.
Every command is basically 'verb-noun'. You don't know what the command or switches are:
> get-help "command" -showwindow
It will give you a list of options if you didn't select the exact command with get-help.
It feels* amazingly buttoned up as a scripting language and it's really cool to be able to take advantage of lower level stuff, like you can run alternative shells (we have cygwin installed on some of our servers), you can run C# code, you have access to interfacing with .NET api's. I haven't messed with anything azure yet, but being able to interface with products and services like SQL/Exchange/O365/azure/servers/desktops from the same language seems pretty cool.
Admittedly, the learning curve feels terrible though. I felt like a dunce for the first couple weeks, couldn't navigate the language at all, and was always in the docs trying to figure stuff out. I think I just needed to understand how the people developing powershell intended for it to be used. Once I was able to put two-and-two together about the verb-noun structure and how to find information/examples about the cmdlets it's been quite easy to work with it.
If anyone else has any extended experience with it, please share your thoughts/opinions. Curious to see if your experiences are/were similar to mine.
If you don't have Powershell experience, please feel free to share your opinions of Micro$haft and me for using Micro$haft products too! It's all good 😎9 -
Any Go devs in Windows out there? I'm interested to hear about your dev environments.
IDE, Powershell vs MinTTY, native windows vs WSL, other tools?4 -
> Be me
> Fresh out of school
> Do some volunteer work for 1 year before starting to work
> Start work at local hospital
> One day get assigned new task
> "We have this directory where there is a file for every employee who has a key - File contains legal stuff"
> Current naming scheme "MaxMustermann"
> Desired naming scheme "Max Mustermann"
> Task: rename every file.
> 1974 Files
> OHNONONONO.JPG
> Hol up buddy
> A repetetive automatable task?
> I know this
> Im a hackerman
> Let's write a script....
> *SMASHES WINDOWS BUTTON*
> "Python"
> No results
> I could have guessed that
> *SMASHES WINDOWS BUTTON*
> "Java"
> No Java compiler
> OH no
> *SMASHES WINDOWS BUTTON*
> "Powershell"
> "tHe eXEcUTIon oF poWeRsheLL sCriPts Is dIsAbLeD"
> REEEEEEEE
> *SMASHES WINDOWS BUTTON*
> "cmd"
> "YOu dO noT haAV thE rEqUiReD peRmIsSionS To oPeN tHis proGrAm"
> DAFUQ
> Wait this is windows.
> Windows ships with .NET
> *SMASHES WINDOWS BUTTON*
> "csc"
> No results
> OHHELLONO.gif
> mfw I have to rename 1794 files by hand.
( Please send help )7 -
Just wanted to do some scripted image resizing for school in school because the teacher asked me to help her with that.
So I thought: Let's just write a tiny script. Written the script in almost no time (just iterates over all jpg's and resizes them)
30sec.
Now I tried to run it. Didn't have my laptop so I had to somehow run it on their windows PCs. At least it's windows 10, unlike other schools that still run XP and stuff so I thought it might be doable. Well guess what, nope it wasn't.
First tried to install imagemagick, that didn't work as only teacher accounts have admin and the teacher was already pretty scarred once he saw me doing stuff in powershell so I thought I'd better not ask to do this via a teacher account and mess with stuff as admin.
Next method: Installing msys2. That worked at least (after taking forever to install and having to mess with the av software to get it to run).
And there comes the next problem: pacman doesn't connect via the proxy so I can't download any packages. There is free wifi but only for teachers, and students aren't going to get access until the school finally has a faster connection because they'd (understandably) cause this connection to be constantly overloaded. I just happen to have access to this wifi network, too, because at least the guys from the IT dept know how bad using proxies under linux is. So I connect via wifi and it works. At least I thought: After running the script it yields weird errors about unsupported arguments even though the command is exactly the same I have been using for years (already checked typos twice)
Then got the idea of simply installing imagemagick on termux on android and transferring the files onto my phone.
Too bad we aren't allowed to attach our own USBs to the pcs. Luckily I got a rooted phone so I simply activate adb over network and connect to it.
After downloading the platform-tools I can't run them because of AV software. Luckily there is an option to add an exception per executable so I do that. After doing that it works.... nope it doesn't. The wifi only allows 443/tcp and 80/tcp, even for internal network devices.
So that's it. I'm simply going to upload that stuff to my nextcloud and convert it at home.
Windows, I hate you!!!2 -
Am a Computer Science student. And learned C, C++ and Java. And right now learning C# through online tutorials and practicing side by side.
So my question is, should I learn bash shell or not? Is it worth learning it? Or should I learn powershell scripting? Or should I don't learn either of them.6 -
a simple ADO.NET interface to query any relational databases from PowerShell using SQL [1] and a Gtk3 lightdm greeter [2]
not very overwhelming compared to what most of you guys have created but - hey, it’s something.
[1] http://github.com/off-world/...
[2] http://github.com/off-world/... -
When the documentation suggests you use composer to install swiftmailer so I can use sendgrid.
Even though I can install composer as an extension and sendgrid is integrated within the portal it's down to me to work out the azure cli or is it a powershell cli or is it bash?
Echo gives kudu error, oh well if there's kudu why am I using composer?
Grrr azure you don't make it easy. -
What do you think about Powershell on Linux?
I personally like PS quite a lot, on windows. It quickly became one of my favorite languages, during my apprenticeship.
I also have an everburning hatred for python, so PS is kinda enticing to me.8 -
The whole windows server + ms sql server ordeal is the biggest fucking joke I've ever seen in my time being a dev.
The ms sql dashboard uses a hidden user to access files and stuffs, so I spent 1 hour trying to make the dashboard's explorer to find the database dump file, only to find out that the file need to be owned by the hidden user. So
I spent about 1 hour trying to set the correct owner of the dump file, but to no avail, the explorer still couldn't pick it up. Then I spent another hour to set the correct owner for the containing folder. Finally, a 6 years old answer on SO point out that I should just put the fucking .bak file in their default folder, and voilà, the fucking thing works like a charm.
I can't get why Microsoft has to go out of their way making permission management on their os so fucking convoluted. The fucking usernames are a fucking mess, you have to go through a bunch of form to change just the owner of a file (please don't start me up with that running some command on powershell bullshit, I would rather deal with bad GUI than a badly designed CLI)
If I were to being positive though, Microsoft is actually one of a few tech companies having a good technical decision of moving their shits over Linux. -
So, I just (few hours ago)made a new variable that's either brilliant or innately flawed... not sure yet. It's an oddly unique var...
__bs__
So far I only made it in python and windows env (i script like the methodology of css).
I bet you're wondering how I've defined __bs__ and the practicality of it.
__bs__ is derived from a calculated level of bullshit that annoys me to tolerate, maintain, etc. as well as things that tend to throw nonsensical errors, py crap like changing my strings to ints at seemingly random times/events/cosmic alignments/etc or other things that have a history of pulling some bs, for known or unknown reasons.
How/why did this come about now?
Well I was updating some symlinks and scripts(ps1 and bat) cuz my hdd is so close to death I'm wondering if hdd ghosts exist as it's somehow still working (even ostream could tell it should be dead, by the sound alone).
A nonsense bug with powershell allowing itself to start/run custom ps1scripts with the originating command coming from a specific batch script, which worked fine before and nothing directly connected to it has changed.
I got annoyed so took an ironic break from it to work on python crap. Python has an innately high level of bs so i did need to add some extra calculations when defining if a py script or function is actually __bs__ or just py.
The current flavour of py bs was the datetime* module... making all of my scripts using datetime have matching import statements to avoid more bs.
I've kept a log of general bs per project/use case. It's more like a warning list... like when ive spent hours debugging something by it's traceback, meticulous... to eventually find out it had absolutely nothing to do with the exception listed. Also logged aliases i created, things that break or go boom if used in certain ways, packages that ive edited, etc.
The issue with my previous logging is that it's a log... id need to read it before doing anything, no matter how quick/simple it should be, or im bound to get annoyed with... bs.
So far i have it set to alert if __bs__ is above a certain int when i open something to edit. I can also check __bs__ fot what's causing the bs. I plan to turn it into a warning and recording system for how much bs i deal with and have historical data of personal performance vs bs tolerance. There's a few other applications i think ill want to use it for, assume it's not bs itself.
*in case you prefer sanity and haven't dealt with py and datetime enough, here's the jist:
If you were to search any major forum like StackOverflow for datetime use in py, youd find things like datetime.datetime.now() and datetime.now() both used, to get the same returned value. You'll also find tons of posts for help and trying to report 'bugs', way more than average. This is because the datetime package has a name conflict... with itself. It may have been a bug several years ago, but it beeb explicitly defined as intentional since.2 -
Just closed VSCode running gulp, expecting it would terminate the session as well... it didn't.
Now I have no freaking idea how to shut the PowerShell running that shit.2 -
I hate Pull request system!
Plot twist: I just put it in place in my organization because I see the benefit.
Just spent 4 hours (Note : delay was because git refuses to write to stdout and writes everything in sdterr. And couple other things) developing a helper “powershell” script for “small tasks”. It sits directly in the project and as of 30 mins ago available to all devs.
Let’s say you need to change a typo.
Normal process:
• Create a branch
• Fix problem
• Commit/push
• Create pull request (This one was NOT easy. I’ll explain why if someone is interested)
• Switch back to master to fix second bug
Script does exactly that now. ./CreatePullRequest.ps1 <tmpbranchname> <Comment>. (The target for pull request will be the original branch, not limited to master)
Now I’m trying to find what I missed. Because I missed something, 100% guarantied.14 -
I've just seen Powershell Crescendo... Which seems to be glorified aliases? Am I getting this wrong? Also does anyone prefer Powershell commands above (literally ancient) Linux program names?2
-
Anyone faces Powershell errors in terminal of vscode ?
I get it because of flask and anaconda navigator's stuff !4 -
when you can't generate ssh key in powershell, because the -N option (Passphrase) requires an argument.
the same works in cmd.. without error....4 -
I just helped my friend setting up Laravel on her machine. The npm is giving me headache because of the fucking permission issue. WHY THE FUCK chmod DOESN'T WORK ON WINDOWS IF POWERSHELL RECOGNIZE THE COMMAND?? Then composer says that it cannot find the autoload.php. I thought it was another permission issue end up it's because composer fuck up installing on Windows. Wasted 2 hours for this shit.
Oh and the default language she uses is French. The keyboard layout is entirely different. French is totally awesome but the typos in command is getting really annoying. :(
I'm not saying Windows is bad for general use but I think it's a bad idea for developing non-Microsoft product on Windows. I don't understand how can one bear with so much shit on Windows. Most dev tools tutorials are written in Unix system so fucking get a Mac or Linux at least!2 -
i swear sometimes windows can just piss you off. like why. luvit.exe is in the SAME folder as octi.lua. command prompt sees it and runs it, but powershell apparently doesn't like that and wants to make things complicated.
also inb4 im called a total idiot2 -
Client's IT department is fine about giving me a laptop for exclusive access to their VPN, security reasons, etc. Ok, fine I get it.
But they do not want to give me a Linux machine - only Windows!
How am I supposed to get shit done.11 -
...I was telling my friends one of the methods of de-crapping fresh installs of Windows that I use, and for some reason, I thought about this (old) meme.
So, I created, too. Might as well share it -
Ugh, fuck the SSRS web service. Spent all week trying to consume the service with PowerShell, doesn't make it any easier when there are undocumented behaviours. TypeName property has to be Type, for instance, when creating a search condition, TOTALLY contrary to the documentation.
Want to change the data source for a report you uploaded? Gl;hf! Back to it next week, think I'm close to having a working deployment script...so close. -
PowerShell - Why do you need separate modules for reading and writing YAML? Spent half a day trying to merge to GitHub projects to support ConvertFrom-YAML and ConvertTo-YAML
-
Work as a SOE Engineer and have a lot of custom application deployments managed via PowerShell. Collegue came over today and suggested that I include a few more "sleep" breaks as newer processers run code to fast and can skip over cmdlts.
I can't even.2 -
!rant
The best thing out of Microsoft is PowerShell. I wish there were some linux shells which took a page out of Microsoft's book.3 -
Damn, .NET devs are really and I mean really bad at writing documentation. It is either over-engineered (anything from Microsoft) to the point you can't find shit. Or it is almost non existent and you have to study the repo and read classes, etc. (ANY .net core nuget for writing CLI apps, heck I would argue almost any nuget in general)
4 pages on github WIKI + examples that cover 20% of use cases are not a bloody documentation mate!!!
I used to be linux + any of Python/Go/JS/Ruby/Elixir guy and almost never had problems with poor documentation.
Now living in Microsoft world with .net and powershell is terrifying.3 -
Spend half an hour with the "git remote add ..." yada yada after setting up an git repo on a vps where I failed to create the home directory with the user and had to do it manually.
As I was against making a trash commit to win against the Schrödinger repo I begun torture myself with the PowerShell SSH compatibility.
I gave up at the end and made an commit with some libs I am going to use. After a last SSH port fight with git got everything up and running.
Lastly installed the new magical windows git credential manager and I am hoping to see some fairy dust in the next days.
Tl;Dr:
If(windows&&SSH&&git){
throw new EverythingWrongException("Git gud");
}1 -
Okay, I hope a few people can help me with this; what are the benefits/reasons to use MS technologies? I'm talking about .NET, ASP, Windows Server, Powershell...
I've never understood it. I love Nodejs because you don't have any packages unless you ask for them. Alpine Linux is amazing! It runs on 8MB of RAM from fresh and doesn't need much more space to install.
You want .NET core? 140MB download. You're configuring database connection strings? Feel free to type in whatever you like, it'll parse and replace with some magic variables that have come from some other random file.
I was using Powershell recently, needed to set an env variable. Bash is happy with "export name=value". You want to do that in Powershell? I just googled it and found an entire 40-minute read discussing how to set env vars. Why?! It should be one command, and I don't know who thought that "Get-ChildItem" was _obviously_ referring to env variables.
It seems to me that everywhere MS has got their hands on development-wise, it inherits the typical sales bullshit. No no, you can't call them "websockets", they have to be branded "SignalR" and add tons of overhead. You can't say "disable notifications" it has to be "focus assist". I'm really surprised something as simple as a keyboard hasn't become a "varied user input device" or something of the like.
Am I alone in thinking this?4 -
Best tool: something similar to what I am already comfortable with and have low learning curve and gets the work done. Jet Brains IDE, Sublime text, Google sheets, zsh.
Worst tool: Something which will take me long time to learn and get used to. Vscode, powershell, chrome, vim.1 -
!rant
This morning a coworker comes to me and has been like "I've been compiling this list of all the files on our network that have x in the title for a week now"
I'm like do you want me to use a recursive Powershell script to get you that list in like 10 minutes.
The little things that make you invaluable at work because you are the sole tech guy. -
Requested my data from my old employer sent a link to a sharepoint folder can't download in batch lots of files in _allerrors.txt. How can I do this, internet suggests powershell but commandlets require admin on sharepoint business side and I only have a personal account.
Nearly 16k files to download.
Any idea how to fix this?1 -
Fuck powershell.
How in the world can one lang have so much problems with date conversion, and chars like üöä. Its so funny how they get through just fine sometime when u specify encoding utf8 but other times it has no ides wha5 these chars are.
Honestly fuck powershell -
!rant
Looking for help starting with DevOps.
Does anyone know of a site or forum where you can talk about general coding/scripting patterns rather than just asking specific questions?
Bear with me, this may be a bit longer than most posts here.
I'm a self-taught admin/tech working with one colleague (who's also mostly self taught) at a high school, managing both clients and servers.
We've been doing most things manually bit I'm looking into converting as much work as possible into more of a DevOps setup, with Powershell-scripts for multi step tasks.
I want to do this for a number of reasons. Having a script doing a number of steps would cut down on time spent on individual tasks and minimize the risk that a step is missed or, perhaps even worse, mistyped. Also it's important that I actually learn what I'm doing, why something works and why something fails.
As and example, I have a powershell-script which moves a student from one year to another (basically they have user names with a two-digit prefix based on the year they started and a suffix with two letters from their first names and four from their last names) if they need to repeat a grade.
It basically renames the account in the AD with the correct year-prefix, changes the samAccountName, renames Home and Profile-directories on disk and changes paths on the profile-tab in AD, moves the user into a new OU and security group etc.
It works as intended if the user account to be renamed exists and there's no name conflict with the new name. But I'd like for the script to validate that there's no problem with user names, source and target security groups and OUs etc. and eventually split the script up into smaller clearly defined functions for better readability.
However, I don't want someone to just write the script for me, I'd prefer to be able to discuss script flow and come to my own conclusions and solutions.1 -
Let's exclude some files from our coverlet coverage test!
Sure! That's easy, just remember to pass this super short, understandable, and rememberable command-line argument:
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByFile="**/myFile.cs/**"
You're fucking kidding me, right?
It's 2022 and tools are still using PowerShell syntax... just kill me1