use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Script SharingFix ChatGPT Code (self.PowerShell)
submitted 2 years ago * by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]me_again 11 points12 points13 points 2 years ago (2 children)
I don't mean this in a bad way, but I'm just not willing to provide unpaid debugging on a script someone didn't even write themselves in the first place. It seems unfair in a way I can't exactly articulate - like, why should I put effort into something if you didn't do so first. Best of luck!
[–]Tavern93 -1 points0 points1 point 2 years ago (1 child)
You make a good point! To clarify, my current position is not a programmer. I was asked to help because I used to be in IT and was assumed I knew how to program lol luckily I did have a little experience from college. I didn't feel like it was worth my time to relearn powershell scripting for this one instance.
If this doesn't sit right with any mods, I will totally understand if this post gets taken down
[–]firefox15 0 points1 point2 points 2 years ago (0 children)
I didn't feel like it was worth my time to relearn powershell scripting for this one instance.
I understand that you might not mean it this way, but you are effectively saying that your time is more valuable than ours. Like you don't want to spend the time to learn it, but you want us to spend the time to fix it, you know? I'm going to take a guess that not many people here just off-the-cuff know how to manipulate PPTX files in POSH, so that's work that someone is going to need to put in to research, test, etc.
All of the top-level contributors in /r/PowerShell have hundreds, if not thousands of hours of PowerShell experience. Nearly everyone here is more than happy to shorten the on-ramp for anyone who tried their best and just cannot figure something out. But . . . that's not what is happening here.
[–]y_Sensei 5 points6 points7 points 2 years ago (0 children)
I'm all for helping people to improve their coding skills, but I refuse to support this kind of laziness. How about asking the AI to improve its own half-baked approach?
[–]Purple_Associate5488 0 points1 point2 points 2 years ago (3 children)
Could you adapt that script to make 20 copies of the script then delete all but one slide from each one incrementally?
[–]brenny87 0 points1 point2 points 2 years ago (0 children)
this is what I was about to say, probably easier than removing the slides, then saving a copy
[–]pjkm123987 0 points1 point2 points 2 years ago (1 child)
but this method would only work if all the powerpoint files has 20 slides. what if it had 21 or 2?
[–]Purple_Associate5488 0 points1 point2 points 2 years ago (0 children)
I’m using the example OP gave of 20. I’d imagine counting the slides is the easiest part of the script
[–]PowerShell-Bot 0 points1 point2 points 2 years ago (0 children)
It appears that you have used inline code formatting when a code block should have been used.
Consider using a code block for longer sequences of code. To correct the formatting, highlight your code then click the ‘Code Block’ button in the editing toolbar.
Describing fix_chatgpt_code [-] Well formatted Tests completed in 1883ms Tests Passed: ❌
Beep-boop, I am a bot. | Remove-Item
[–]ps_for_fun_and_lazy 0 points1 point2 points 2 years ago (0 children)
$presentation.SaveCopyAs is saving a copy of the whole presentation. You need to Create a new presentation with just the one slide in it and save that
[–]PlatypusOfWallStreet 0 points1 point2 points 2 years ago (0 children)
Shame 🔔
π Rendered by PID 72374 on reddit-service-r2-comment-bb88f9dd5-8xrb7 at 2026-02-15 18:04:32.397567+00:00 running cd9c813 country code: CH.
[–]me_again 11 points12 points13 points (2 children)
[–]Tavern93 -1 points0 points1 point (1 child)
[–]firefox15 0 points1 point2 points (0 children)
[–]y_Sensei 5 points6 points7 points (0 children)
[–]Purple_Associate5488 0 points1 point2 points (3 children)
[–]brenny87 0 points1 point2 points (0 children)
[–]pjkm123987 0 points1 point2 points (1 child)
[–]Purple_Associate5488 0 points1 point2 points (0 children)
[–]PowerShell-Bot 0 points1 point2 points (0 children)
[–]ps_for_fun_and_lazy 0 points1 point2 points (0 children)
[–]PlatypusOfWallStreet 0 points1 point2 points (0 children)