r/PowerShell • • May 16 '24

What is something PowerShell should not be used for?

134 Upvotes

255 comments sorted by

110

u/nohairday May 16 '24

Replacing robocopy.

17

u/BlackV May 16 '24

ouch, that one hurts

13

u/Xydan May 16 '24

& robocopy

😏

8

u/CyberChevalier May 16 '24

Non but making a function that leverage robocopy 🤩

1

u/KaleidoscopePrize557 Jun 14 '24

are you on please let me know

1

u/CyberChevalier Jun 27 '24

I made one but I cannot make it out of my job and it’s only using the parameter I needed tbh it’s really easy to do and perhaps a good way to learn powershell

7

u/nascentt May 17 '24

I have a ps1 that wraps robocopy and xcopy.
That's seems to be the best of all worlds

4

u/h1psterbeard May 17 '24

Any chance a generous denizen of the internetz to share such a script? I have a mostly functional cmdlet but it doesn't include xcopy.

5

u/technomancing_monkey May 17 '24

Or replacing WinZip or 7-Zip, or any kind of compression tool. I know PS "allegedly" uses the same methods but in my personal experience using PS to archive files with ANY LEVEL of compression takes so much longer than simply using the dedicated tool.

3

u/Powerful-Ad3374 May 18 '24

Once again just use Powershell to make the most of them. I use 7zip within a couple of Powershell scripts

1

u/technomancing_monkey May 19 '24

I have tried that with varying degrees of slow. It still tends to be slower than using the actual application. ...and that seems counter intuitive.

1

u/Powerful-Ad3374 May 24 '24

In that case probably just use the app. I am using it to make secure zip files in automation scripts

1

u/desmond_koh May 30 '24

I literally came here to say that :)

98

u/[deleted] May 16 '24

Making bread

61

u/[deleted] May 16 '24

Create-Bread -Properties * -BreadType "rye" -BakeTemp "350" -BakeTime "40" -Force

15

u/ollivierre May 16 '24

-force is not a recognized parameter. Please fix this.

4

u/BlackV May 16 '24

what about -WhatIf

5

u/ollivierre May 16 '24

I do not like ifs in my bread.

1

u/BlackV May 16 '24

My bread seems to love Ifs, if day is random I will not rise

1

u/JWW-CSISD May 17 '24

Choosy moms choose ifs?

2

u/[deleted] May 17 '24

Choosy moms choose jpegs

9

u/SenTedStevens May 16 '24

No, no. The PS commands would be:

New-Item -ItemType Bread

Set-Item "Bread" -Value BreadType "rye"

Set-Item "Bread" -Value BakeTemp "350" -Force

_#BakeTime is measured in seconds, so 40x60.

Set-Item "Bread" -Value BakeTime "2,400" -Force

16

u/Geech6 May 17 '24

ERROR: BakeTime input string, expected integer.

1

u/bobwinters May 17 '24

Does it with though? If so I use this to fix any errors.. | Out-Null

1

u/lvvy May 17 '24

you seriously confuse me ... Powershell suppose to auto convert types ...

1

u/havens1515 May 17 '24

Pretty sure it will be recognized as a string with a , in it and the quotes around it

2

u/lvvy May 17 '24 edited May 17 '24

You will be very surprised, as I just tested it on a system with Finnish locale:

function MultiplyByTwo {     param (         [Parameter(Mandatory=$true)]         [int]$ShouldBeNumber     )

    Write-Output "Input Data Type: $($ShouldBeNumber.GetType().FullName)"

    $result = $ShouldBeNumber * 2     Write-Output "Result: $result"     Write-Output "Result Data Type: $($result.GetType().FullName)" }

MultiplyByTwo -ShouldBeNumber "2,400"

Outputs

Input Data Type: System.Int32

Result: 4800

Result Data Type: System.Int32

3

u/lvvy May 17 '24

And it is even more surprising, because 2,400 means 2 and 4/10th in European.

3

u/havens1515 May 17 '24

Interesting. I thought for sure it would fail. Thanks for testing

1

u/SenTedStevens May 17 '24

Oh, shit. You got me, Mr. Compiler.

3

u/[deleted] May 17 '24

[removed] — view removed comment

2

u/buthidae May 17 '24

This is correct! Please feel free to bake yourself a cookie using the module on PSGallery

7

u/Hyperbolic_Mess May 16 '24

I can't wait to try my new [PSCustomBread] although it's a shame that BakeTime is in minutes when I do Get-BreadRecipie but for some reason Create-Bread wants it in hours so it got absolutely incinerated...

3

u/nonaveris May 17 '24 edited May 17 '24

Forgot to pipe the dough object through the oven, unless you have bread that self heats to 350 for 40min

More like:

Get-Item “Dough” | Where-Object BreadType -eq “Rye” | Bake-Object -BakeType Oven -Temp 350 -BakeTime 2400

1

u/[deleted] May 17 '24

....450

/Just made a loaf lol

2

u/technomancing_monkey May 17 '24

there seems to have been an error in your CreateNew-Bread script, but since you used -Force SOMETHING emerged... i... i think... is it breathing? Whats that noise? DID IT JUST MOVE ON ITS OWN!? OH GOD ITS CHASING ME!!!!

1

u/BlackV May 19 '24

what ever you do, dont teleport the bread

1

u/quazywabbit May 16 '24

What about hydration?

0

u/[deleted] May 16 '24

[deleted]

17

u/[deleted] May 16 '24

That's goddam hilarious!

/And I have dough proofing in the oven right now - the light provides a perfect amount of heat

4

u/technomancing_monkey May 17 '24

If its anything like New Coke, ill pass.

1

u/dehcbad25 May 17 '24

New is not an approved verb for nound bread, try Bake

1

u/JWW-CSISD May 17 '24

This whole thread is awesome. Y’all are hilarious!

109

u/BlackV May 16 '24

GUIs

grumble kids grumble lawn

15

u/[deleted] May 16 '24

PrimalForms has entered the chat

7

u/BlackV May 16 '24

oh man, I remember that form back in the day, They're still around I hope

2

u/lordkemosabe May 17 '24

SAPIEN the parent company is, my boss is actually trying to get us to move towards using their stuff. Specifically their repository system. Which of course has caused friction with the guy (different sub dept, he's just passionate) who maintains our instance of gitlab lol

2

u/BlackV May 17 '24

Interesting, how's their repository system work compared to a roll your own NuGet

3

u/lordkemosabe May 17 '24

Base level, it can be hosted "anywhere" and I use the term repository lightly as some might argue that it's an apples to oranges scenario, but it's the word they use.
Basically it's structured in the same way a local git repo would work, all the files are in a folder and then there's a file that knows what everything is. I'm not sure how it actually stores the various file versions and at what level it differentiates between a version recorded within a config and what ends up as a new file version. The general idea is you can have a repository anywhere, local drive or file share, and it's supposed to be super friendly and you don't have to worry about silly third party systems or servers cause you can open the file straight into their editor. I'm not sure I'm gonna be a fan of it because it's DEFINITELY not git based from what I've seen. But I could he wrong, and it's just heavily abstracted. But this is all very low level "I watched a guy struggle to get it setup over slack" type observation so i may end up obsessed with it.

→ More replies (1)

8

u/Fakula1987 May 16 '24

.net enters the Chat.

But i Wonder If you still call it Powershell then If you write a .net Programm.

10

u/BlackV May 16 '24

No you can call it a dll module and ask for double the pay :)

11

u/lanerdofchristian May 16 '24

Even worse than GUIs, TUIs and console menus. At least GUIs have the "this is for non-technical users" feel going for them; console UIs are just "I am a sysadmin too stuck in my ways to learn how to use my tools in the way they're most effective."

8

u/zoidao401 May 16 '24

Is it really that bad?

I only recently put together a GUI for a couple of scripts I use regularly, and it's been pretty okay.

A little tedious sure, but it works.

10

u/BlackV May 16 '24

HA

Is it really that bad?

Short Answer: Yes

Long Answer: Depends, how its done and why its done and is it done at the expense of a parameterized script/module or in combination with

3

u/zoidao401 May 16 '24

Just using it to feed parameters into my functions, i.e. put the target machine(s) in a box and press go rather than having to remember the function names and type them out.

5

u/BlackV May 16 '24

ya there are deffo use cases for a gui, old people is another valid usecase

4

u/EtanSivad May 16 '24

One option is to create the GUI in visual studio using WPF and creating an XAML that describes the window.

It takes a little bit of tweaking to get Powershell to render it properly. Script example here: https://gist.github.com/QuietusPlus/0bceaf7f52eb23841e3f7bcf191fc6df

2

u/AcadianMan May 16 '24

You can make half decent gui with it.

3

u/thehajo May 16 '24

me looking up from my user creation script with text fields, 3 drop downs and 8 listboxes

Oops?

4

u/BlackV May 16 '24

hahahaha

I had conversation around this yesterday actually

"thanks for making this nice menu here, but your actual script doesn't work with all those values you're populating, get the script working as you want, make a gui afterwards"
"better still, get it going using parameters, then the gui is optional and it can still scripted"

3

u/jedipiper May 17 '24

But XAML!

2

u/BlackV May 17 '24

It's the way of the future you know

3

u/technomancing_monkey May 17 '24

any script I build that has a GUI is for me to deploy to my lesser technical co-workers to allow them to complete the tasks i need them to without making a giant mess out of things.

that being said, each of the tools that i build that has a gui can ALSO be used from the console without the gui.

Activating the GUI is done with a switch, thats called in the shortcut with a custom icon that they can just double click to launch.

2

u/BlackV May 17 '24

This is the way

4

u/AppIdentityGuy May 16 '24

100% agree. Powershell is a command line beast. Do what you need to do export whatever data you need and then pull into excel/Powerbi etc for display or further manipulation.

4

u/kenef May 16 '24

Bro, I wrote a multi-threaded GUI-driven PoC in powershell of app that loads (or downloads and loads if not present on disk) specialized LLMs based on what the user is doing on the PC.

It features a LLM file Downloader, behaviour evaluation, webforms2 for AI interaction hashed variables to sync across threaded objects..

I don't know why I did it in PS, it is super ugly but it worked! Ps definitely ain't the best language to do this in tho, but I had to show the approach somehow.

7

u/BlackV May 16 '24

That sure was a lot of buzzwords, I think you and I cant be friends :)

4

u/kenef May 16 '24

The finished product is about as coherent as the buzzwords salad too lol

1

u/BlackV May 16 '24

hahahaha but it works :)

2

u/DIY_Colorado_Guy May 16 '24

This is totally dependent on what you're trying to do. A full feature program should not be written in Powershell. However, there's nothing wrong with using a GUI to create small tools to do common operations. Especially for day-to-day office tasks.

1

u/BlackV May 17 '24

Deffo depends on what you're doing for sure

But I'll stay in the no and depends camp for now

1

u/ollivierre May 16 '24

What's wrong with WPF ? Or should we build a web UI ?

1

u/BlackV May 16 '24

I'm kinda poking fun here

but no nothing wring with it, it really depends on how and why the gui is there in the first place

this is IMHO of course

1

u/CyberChevalier May 16 '24

It’s not that powershell is bad is just that winform are consumed by powershell but can be more efficiently consumed by other compiled languages. It’s more efficient to call powershell cmdlet from a c# gui (because of async and other tools ps does not have) than to make it full powershell. The right approach is use powershell to retrieve information and use c# to create the gui around

1

u/Anacreon May 16 '24

This is funnier than it should be.

1

u/dcdiagfix May 16 '24

Came here to second this!

1

u/BlackV May 16 '24

do we get shirts ?

1

u/gordonv May 16 '24

Simple menus are ok.

Wrote 2 scripts that use it:

1

u/Least_Gain5147 May 19 '24

If the form design is painful to build, then I'm making it painful for the user too, dammit. Now get off my lawn, you meddling youngsters!

2

u/BlackV May 19 '24

If I suffer, everyone suffers :)

21

u/_iAm9001 May 16 '24

At work I have this saying.... "Don't try to build the Taj Mahal out of match sticks. Use matches for lighting a fire. Use C# to build a masterpiece. Sure you can do it, but you really shouldn't.".

12

u/spyingwind May 16 '24

PowerShell used for the build script? Hell yes!

PowerShell used for the EOD financial batch processing? No.

12

u/Coffee_Ops May 17 '24

That's obviously the job for a macro-enabled excel workbook.

10

u/gordonv May 16 '24

Game creation

2

u/[deleted] May 17 '24

What about text adventures? 😏

9

u/[deleted] May 17 '24

Replacing or using it instead of standard solutions that already exist. 

Lots of people here use PowerShell when they would be better off using GPO or MECM for example. 

Lots of people here use PowerShell for solutions better built using a proper programming language instead of a scripting language (building GUIs...).

And so on. 

4

u/GrumpyOldTech1670 May 17 '24

Agreed.

Found mapping network drives and loading printers via Group Policy is lot easier than trying to do it through PowerShell

1

u/Egoignaxio May 17 '24

What about when you just need a network drive during a script? Lots of situations where group policy isn't applicable

2

u/ipreferanothername May 17 '24

Lots of people here use PowerShell for solutions better built using a proper programming language instead of a scripting language (building GUIs...).

i kinda get this. i cant learn but so much about so many damn languages you know? personally we have a job runner that lets me require input parameters that i can pass to a script for stuff people have to run manually, so it stands in as my gui.

but i dont have time to learn c# or something to make deeper programs or interfaces, im an admin in windows land. we keep up with so many bits and pieces of languages and im kinda burnt out on it.

if i want to query something am i using KQL? SQL? WQL? REST? Graph? LDAP?

if i want to configure something am i using json, xml, yaml, csv?

im pretty tired of it honestly. my fucking brain is about full. /endRant

1

u/JWW-CSISD May 17 '24

I’m in this comment, and I don’t like it. I spend half my time when building a new script figuring out how whatever data structure I’m manipulating even works.

1

u/PositiveBubbles May 17 '24

I agree, except with MECM, you can't lock down permissions as granular as large orgs want lol I've tried

17

u/[deleted] May 16 '24

Installing updates to Windows store apps through an RMM apparently. Spent several hours today tangoing with winget. I lost.

13

u/BlackV May 16 '24

I mean winget is not powershell in fairness

3

u/1Original1 May 17 '24

Well Winget breaks often,the fixes for Winget are powershell commands. But they depend on other MSIX bundles and packages to be installed that also only work half the time in Powershell,so you try those through the store instead. It's a triple threat

2

u/[deleted] May 16 '24

Sure, but powershell also has no native method. So either way I'm chucking it in the category of "not to be used for".

6

u/BlackV May 16 '24

apparently they are working on powershell native winget but its comming soon^^tm

3

u/swissbuechi May 16 '24

You could just enforce auto updates for store apps via CSP.

2

u/[deleted] May 16 '24

I'm assuming you're talking about this? https://learn.microsoft.com/en-us/windows/client-management/mdm/update-csp

I'm looking around but can't find a how to guide for actually using it.

2

u/swissbuechi May 16 '24

No not really, I will provide you with the link in a minute.

6

u/swissbuechi May 16 '24 edited May 16 '24

If you want to allow automatic UWP app updates from the Microsoft Store, including built-in Windows apps. Set Turn off Automatic Download and Install of updates to Disabled.

Source: https://learn.microsoft.com/en-us/mem/intune/apps/store-apps-microsoft#what-you-need-to-know

CSP: https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-applicationmanagement#allowappstoreautoupdate

3

u/Raymich May 16 '24

What’s the issue you’re facing? I’m using winget with RMM to install and update apps in both user and system context without any trouble.

The only difference is that winget doesn’t have path variable for nt\system, but you can always execute binary directly.

2

u/[deleted] May 16 '24

Edit: Fighting markdown

Trying to install winget in the first place. I'm getting a lot of conflicting info on that topic. From what I understand basically every device should have it by default past some old version of windows 10. And yet I'm dealing with a windows 11 device that somehow doesn't have it. I get the ol "not recognized as the name of a cmdlet, function, yadda yadda".

When I try to install winget via Add-AppxPackage I get this:

    Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF9, Install failed. Please contact your software vendor. (Exception from HRESULT: 

0x80073CF9) Deployment Add operation rejected on package Microsoft.DesktopAppInstaller_2024.506.2113.0_neutral_\~_8wekyb3d8bbwe from: winget.msixbundle install request because the Local System account is not allowed to perform this operation.

This is my full script:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Check if winget is installed
if (-not (Get-Command winget -ErrorAction SilentlyContinue)) {
    Write-Output "Winget is not installed. Installing..."
    # Download and install winget
    $wingetInstallerUrl = "https://aka.ms/getwinget"
    $InstallerPath = ".\winget.msixbundle"
    Invoke-WebRequest -Uri $wingetInstallerUrl -OutFile $InstallerPath
    Add-AppxPackage -Path $InstallerPath
    # Check if installation was successful
    if (-not (Get-Command winget -ErrorAction SilentlyContinue)) {
        Write-Output "Failed to install winget."
    }
    else {
        Write-Output "Winget has been successfully installed."
    }
}
else {
    Write-Output "Winget is already installed"
}
Write-Output "Searching for upgrade to Paint"
winget upgrade "Paint" -e
Write-Output "Searching for upgrade to 3D viewer"
winget upgrade "3D Viewer" -e
Write-Output "Searching for upgrade to Remote Desktop"
winget upgrade "Remote Desktop" -e

2

u/Raymich May 16 '24

That’s correct, it should be preinstalled by default. NT\SYSTEM account is computer itself and doesn’t have a user profile, that’s probably why path env is not exported and why winget msix package fails.

Try installing same msix using your local admin account instead. Most RMM should allow you to store credentials and run scripts as that user. You can ofc also use “runas” from terminal. Or just remote to that PC and log in as admin to run msix.

This is an old problem and it’s rather silly that Microsoft hasn’t addressed it yet. Technically speaking, winget expects user running it to be admin. But there are ways around that.

2

u/Emiroda May 17 '24

Don’t try to sideload the msix, it’s a mess. Force update all store apps instead (run as SYSTEM): Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod

Will get you the newest App Installer (winget) version.

Then run Winget with the full path as SYSTEM: & "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" upgrade --all --silent --accept-source-agreements --accept-package-agreements

1

u/JWW-CSISD May 17 '24

Except there’s no way I know of to tell when the DesktopInstaller app installs/updates, other than just running a loop checking for the executable/command, which is kinda ugly.

Also, I’d rather not have a cart full of student laptops hammering the WiFi at the same time updating every single Store App. Users are already complaining about how long it takes to boot up and login the cart laptops due to having to create a new user profile every time.

I’ve been banging my head on this one for a couple months now.

1

u/Emiroda May 17 '24

I can see the frustration, my condolences. Modern Windows really doesn't work well with education. I don't mean to diminish your situation, but in any situation other than student laptops, you should seriously be forcing store updates with the command above on a regular basis as part of vulnerability management. Not just Winget, but for the sake of securing the other store apps on the device.

→ More replies (1)

1

u/QuidHD May 17 '24

In my experience, this is not true. Calling winget.exe directly as SYSTEM throws an access is denied error. The winget client GitHub indicates executing winget as SYSTEM is only possible by leveraging the currently-limited Microsoft.WinGet.Client PowerShell module.

2

u/Emiroda May 17 '24

Not my experience, I use winget.exe as SYSTEM from my RMM for all of my app installs and updates. You just need to:

  • Force update the App Installer store app, if you don’t have an RMM that manages store apps you can force update all store apps with this command: Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" | Invoke-CimMethod -MethodName UpdateScanMethod

  • Give it the full path to winget: & "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" upgrade --all --silent --accept-source-agreements --accept-package-agreements

1

u/Raymich May 17 '24

btw, you can also save first part in a variable, it can help when you're working interactively from a remote terminal

$Winget = "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe"

Then just work with it just similar how you would with normal winget command:
&$Winget install --id "Microsoft.AzureCLI"

1

u/Raymich May 17 '24

try below, it should list available updates

$Winget = "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe"

&$Winget upgrade --scope machine --include-unknown --accept-source-agreements --disable-interactivity

2

u/[deleted] May 16 '24

What RMM? If it was ConnectWise, don't be too hasty in blaming PS... :)

1

u/[deleted] May 16 '24

Datto RMM. Though I'm not sure I'd blame connectwise if I was using it either. Either way you're running powershell as system.

2

u/[deleted] May 17 '24

I was just making a joke that CW sucks :)

1

u/[deleted] May 17 '24

Oh, in that case carry on. It is always acceptable to say that CWA sucks. Fucking crashy piece of bloated shit. It's the best tool of 2004. It would blow my mind 20 years ago, but simply does not work for the modern day. If I transition from your product to a Kaseya product and I'm happy about that then you have seriously fucked up.

6

u/Ok-Conference-7563 May 16 '24

Gui based apps imho

10

u/dcdiagfix May 16 '24

GUIs

1

u/Bademeiister May 17 '24

How do you guys build GUI Tools for Support?

2

u/dcdiagfix May 17 '24

I don’t.

2

u/GYN-k4H-Q3z-75B May 17 '24

With every year that passes, I rely on GUIs less and less. If it is used by developers, admins and power users, chances are it's best skipped.

2

u/[deleted] May 18 '24

Only reason to make a gui is for the non IT if I am Disney world but i am still expecting a call one day 🙃

1

u/jantari May 19 '24

With a web-based solution that does that for you, including authentication / delegation and audit logging.

Do. Not. Build. GUIs. In. PowerShell. It's that simple.

5

u/nealfive May 17 '24

Most GUI stuff…

4

u/gordonv May 16 '24

Web CGI-BIN applications. Although I wish it would replace PHP

2

u/tocano May 17 '24

I too wish it was easier to execute PS scripts from a web frontend (short of an entire application like PowerShellUniversal). There needs to be like a built-in IIS module to enable it to interpret PS. I'm shocked Microsoft hasn't done this already. 

2

u/wonkifier May 17 '24

It's been years since I did it (we're not a Windows house anymore), but there was at least one module you could get that would run PS scripts as cgi.

We used it as part of a backend for an internal portal that let people do things to various enterprise objects of theirs. (in this case, en Exchange section so they could manage groups and things with more controls than ECP gave)

1

u/mrbiggbrain May 19 '24

This really not that hard. There are really simple ways to host a web server from within PowerShell and have it run PowerShell commands depending on what URL they connect to. You can then return the results or provide the user with a job code they can look up later.

1

u/tocano May 19 '24

Any links you can share to what that looks like?

0

u/nonaveris May 17 '24

Windows Server and Hyper-V Server say hello.

4

u/Delicious-Ad1553 May 16 '24

To work with millions of objects without ram optimisation 

4

u/WhatThePuck9 May 16 '24

Continuously monitoring WMI

4

u/seagulledge May 17 '24

Replacing ICACLS

1

u/Vance_Lee May 17 '24

works fine for me. takeown, however.. yeah, pita to take ownership from powershell. (but possible, with p-invoke)

1

u/gordonv May 17 '24

Supplementing ICACLS, yes.

3

u/MoonGrog May 17 '24

The dishes, it always leaves spots

2

u/holyshitatalkingdog May 17 '24

I made a game of Snake using only basic functions and the shell window as the GUI. It was one frame per key press and not even remotely fun, but it (kinda) worked.

2

u/xBurningGiraffe May 17 '24

Too much data or anything that requires low memory consumption

2

u/onthefrynge May 17 '24

Ive built an entire iam/iga system with a task queue, script scheduler, data sync from/to multiple platforms including Google/ad/entra/and several custom apis. Almost all in powershell and I can tell you, you should definitely not do what I did lol.

2

u/FourtyTwoBlades May 17 '24

A web server.

I wrote one once stealing methods from .NET but the performance was horrific.

Pode solves this by using a .NET web server at the core, but it's sad it couldn't be done natively in PowerShell.

2

u/MutedSon May 17 '24

Sex. PowerShell should not be used during sex.

2

u/PositiveBubbles May 17 '24

Agreed, even an ascii console displaying porn via powershell would just make me more interested in the code than the guy haha

1

u/gordonv May 17 '24

Why do you have so many sessions running?!?!

2

u/Crabcakes4 May 17 '24

I had a help engineer earlier this week send me a link to a stackoverflow article that was one of the first results when googling my error code, like does he think I didn't google this before opening a case?

2

u/TheBigBeardedGeek May 17 '24

As an ERP

That's what access is for

1

u/aringa May 16 '24

Video editing

3

u/Xibby May 16 '24

😂 Somewhere in my archive I have a script that chops the first 25 seconds off every video in a directory (calls ffmpeg.) Removes the Universal Studios into off TV shows perfectly.

1

u/OPconfused May 17 '24

Haha that's awesome. Do you share the script?

1

u/No1Asked4MyOpinion May 16 '24

Something that won't actually save you time in the long run.

1

u/JWPenguin May 17 '24

Is ssh via Windows terminal even close to putty? Just trying to use it... Lotta misery.

1

u/jedipiper May 17 '24

Azure Runbooks. They are so freaking slow.

Or maybe it's just our implementation.

2

u/Mycolo64 May 18 '24

I’ve had so many problems with azure runbooks I will never use that service again. I had a scripts running every week that pulled data from multiple data sources and tossed it in a sql database. Performance was find no problems with performance. But Azure would keep on making updates that broke everything. About once every 2 months I would have to open up a ticket with azure support because they updated something and my runbooks all broke.

Eventually spun up a VM and using task scheduler schedules the scripts. Never had an issue since

1

u/RCG89 May 17 '24

For checking checksums. So damn slow. Even with stream.io

Have moved to multi-thread jobs

1

u/Gummyrabbit May 17 '24

Poetry

1

u/gordonv May 17 '24

I've used APPIs for ChatGPT in Powershell. It's... well, not good, but it works.

1

u/[deleted] May 17 '24

the other replies about memory usage etc are nonsense. You can use .NET libraries like system.io in powershell VERY easily if you’re dealing with datasets over 100,000 lines. Under 100,000 lines and you’re probably not going to feel any pain from using built in commands like Import-Csv, other than from Group-Object in 5.1.

That being said, if you want to punish yourself, try to write a windows forms/WPF application in powershell. It’s doable enough that you may be tempted to try it in powershell rather than just properly use C# in visual studio, but full fledged application development is simply not an intended use case for powershell and you will run into a variety of weird problems that all have very janky solutions.

1

u/[deleted] May 17 '24

Many things. Among them: • Taking over the world • Laundering money from gang-related activities • Murder

1

u/Illeazar May 17 '24

Brushing your teeth

1

u/Beautiful_Giraffe_10 May 17 '24

Making breakfast

1

u/Og-Morrow May 17 '24

Reading Emails

1

u/hankhillnsfw May 17 '24

I cannot stand how powershell manipulated html data. It’s so bad.

1

u/bodobeers May 17 '24

making coffee? :P

2

u/m-o-n-t-a-n-a May 17 '24

That's what Java is for

1

u/tr14l May 17 '24

Executing

1

u/CenlTheFennel May 17 '24

If your saying, oh I’ll use jobs, tasks, or run spaces, then you need to move on from PowerShell to something more scalable

1

u/PinchesTheCrab May 17 '24

It's not a reliable prophylactic

1

u/dehcbad25 May 17 '24

Making coffee....it just never gets the right ratio right

1

u/colter_t May 17 '24

A word processor. A toaster. A loving wife.

1

u/[deleted] May 18 '24

GUI. Trying to make a fallout 4 update reverted where it reverts all the files to the old version that made mods works. GUIs was a pain to work it but it was great experience. I soon shelved it

1

u/faculty_for_failure May 19 '24

Not running neovim

1

u/Yumi_Koizumi May 19 '24

Re-inventing rsync

1

u/[deleted] May 20 '24

Anyone in this thread 🤣

1

u/Potential_Weirdo_360 May 27 '24

Cooking, Pasta Shells will work better lol

1

u/KaleidoscopePrize557 Jun 14 '24

is anyone on tonight

1

u/jba1224a May 16 '24

Building gui applications. Use a proper language.

I await my cavalcade of downvotes.

1

u/BeerJunky May 17 '24

A cheese grater or a doorstop.

1

u/Bynkii_AB May 17 '24

Powershell should not be used to grease a pan

1

u/lordkemosabe May 17 '24

IMO anything beyond windows/AD administration. It's very good at that, but it sucks at anything to do with data of any kind and for me that eliminates pretty much any other usecase

1

u/opi098514 May 17 '24

Video games.

0

u/[deleted] May 16 '24

Welding steel.

0

u/trickyrickysteve199 May 16 '24

Sex.

1

u/salad-poison May 17 '24

Not with that attitude anyway.

0

u/algaefied_creek May 17 '24

I would highly suggest avoiding powershell for flossing your teeth

-1

u/DiamondHandsDevito May 16 '24

Pickup lines & flirting

-1

u/sportosporto May 17 '24

It's just like Microsoft Edge, you use it to get a better terminal.

0

u/Old_Bird4748 May 17 '24

Blending bananas into smoothies.

0

u/Grand_rooster May 17 '24

Powershell shouldnt be used to deli er wedding vows nor should you use it in lew of a fishing pole.

-3

u/Blackos972 May 16 '24

Cyberattack...

3

u/[deleted] May 16 '24

-4

u/oubeav May 16 '24 edited May 17 '24

Your Mom?

0

u/BlackV May 16 '24

apply ice to the effected area (ignoring the your vs you're)

2

u/oubeav May 17 '24

Dammit

1

u/BlackV May 17 '24

Good times