r/PowerShell • u/AutoModerator • 28d ago
Script Sharing What have you done with PowerShell this month?
A sticked post for the community to share their projects throughout the month.
Make sure to post a link to the code!
20
Upvotes
10
u/MetaCardboard 28d ago
Get-aduser (user) properties -passwordexpired
4
u/arslearsle 28d ago
A few functions I use as a photograper
Convert canon eos raw cr2 files to jpg as preview to customer for selection, shrink size, reduce quality and use LAB color space for sharpening, stamp image number from filename on jpg file, and a stamp saying preview
wake up adobe lightroom - why you dont hsve these features
mush faster than adobe lightroom, as it uses ps 7 foreach -parallell
Also functions to make jpg images square for the idiotic instagram format, it mounts photo on top of a white square background, stamp image w logo, and you can choose LAB sharpen or standard sRGB sharpen (unsharp mask)
…and also a function that splits a photo into 9 proportional parts, of you want to make a little fun in an i instagtam post
last two is not async/parallell
uses imagemagick for image work
guess you vould do the same using . net but…it works nicely
3
u/JimsTechSolutions 27d ago
I use Enter-PSSession on a daily basis
2
u/lan-shark 27d ago
I'm working a bit on PowerShell's syntax highlighting grammar. The project is in a bit of a sad state, unfortunately. The first issue is that the main branch doesn't even pass all the tests, there are two failures. So I have a PR out for that, hopefully it gets merged soon and I can make progress in other areas. While I wait on that, I'm exploring more options to test the grammar. The project is currently using the old Atom editor which was sunset in 2022 or something. I've tested a couple of newer drop-in replacements already and I'm about to start on exploring options for a more thorough rework with a newer stack
2
u/human193 25d ago
Packaging applications using PSADT
Remediating the node2shell on endpoints I had to compare current Nodejs version with target version. Nodejs doesn't have a build number when cast as a [version] so comparing to another version wouldn't work.
So to compare the versions I had to normalize them with $NodeVerNormalized = [version]::new($NodeVer.Major,$NodeVer.Minor,$NodeVer.Build) $22targetversion = [version]::new(22,23,4)
Repeated for version 24 and 26.
Something I'd never done before.
2
u/Respond-Creative 21d ago
Wrote a module for Microsoft Attack Simulator.
1
u/pleplepleplepleple 25d ago
Most notably an interactive Intune Remediation script to offer package manager updates to discovered WSL distros.
1
u/XxGet_TriggeredxX 23d ago
Created offline domain join script(s) for Zscaler.
1
u/Vern_Anderson 9d ago
Added more comment based help to scripts I've written but never took the time to add the synopsis, description, and examples.
1
u/SnooRobots3722 9d ago
In my day job I have a lot of "teams" meetings, and occasionally get the shout of "you're on mute", as I have a little USB MIDI button pad (an AKAI APCmini) I have had written a little script that lights the button green or red to show if I am mute (or not) and pressing it toggles the status in Windows
One advantage of this method is usb midi doesn't need drivers and powershell doesn't need any librarys so it can be used on a work laptop with accusation of installing anything.
Over time I hope to find a use for the twenty other buttons and the sliders!
https://github.com/backache/APCminiForWindowsControl
0
u/ToninoBaliardo 27d ago
"winget upgrade --all" to update software on my home computers.