r/PowerShell • • May 29 '20

PowerShell modules to check out

168 Upvotes

I put together a list of 50ish of my fav modules.

https://ironmansoftware.com/50-of-the-top-powershell-modules-to-check-out/

Any cool ones I'm missing?


r/PowerShell • • Jul 18 '18

Remotely enable PSRemoting when PSRemoting is disabled.

168 Upvotes

I'm just gonna leave this here:

Invoke-WmiMethod -ComputerName $TargetMachine -Namespace root\cimv2 -Class Win32_Process -Name Create -Credential $cred -Impersonation 3 -EnableAllPrivileges -ArgumentList "powershell Start-Process powershell -Verb runAs -ArgumentList 'Enable-PSRemoting –force'"

r/PowerShell • • Sep 08 '22

Script Sharing Creating a Microsoft 365 Automated Off-boarding Process with SharePoint, Graph API, and PowerShell

Thumbnail
thelazyadministrator.com
167 Upvotes

r/PowerShell • • Jul 14 '25

I wrote a script that tells you how much of your SharePoint storage is wasted on version history.

166 Upvotes

Needs PS7 with mggraph module.

I wrote this to make it obvious that over 75% of our Sharepoint storage is wasted by document version history.

By default it's only going to crawl the sites that are specified in $targets by name (name must be exact).

If you want to pull a report on your entire tenant's sharepoint sites, make the edit at line 45, and manage your expectations based on the size of your tenant.

Uses graph so evidently needs the Sites.WhateverIforgot app permissions that allow you to read sites, files etc.

It produces results multiple days faster than the New-SPOSiteFileVersionExpirationReportJob cmdlet that stages a version history report. (my colleague tried to produce a report with that on Saturday and we are still waiting for it, my script has almost finished checking all 2mil+ files on our dreaded sharepoint site after a few hours of runtime)

It needs throttling mitigation implemented, but I haven't had any throttling issues yet with current thread config.

EDIT:
forgot the link to the script

EDIT 2:
repo was private. L


r/PowerShell • • May 24 '23

Solved How do I turn the monitor back on with PowerShell?

166 Upvotes

I turn the monitor off in one of my scripts by running

(Add-Type '[DllImport("user32.dll")]public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)

How would I turn the monitor back on?


r/PowerShell • • Mar 15 '17

Just released v0.10.0 of the PowerShell extension for Visual Studio Code with an integrated console experience like the ISE!

Thumbnail
twitter.com
166 Upvotes

r/PowerShell • • Apr 24 '26

Why does Windows 11 force three different PowerShells?

165 Upvotes

Why does Windows 11 still ship with Windows PowerShell, Windows PowerShell (x86), ISE, CMD, WSL, the new PowerShell 7 app, and the Terminal app rewrite… all at the same time?

Terminal was supposed to unify this stuff. Instead it just launches whatever legacy shell happens to be lying around. I install the new PowerShell like the system tells me to, and now I’ve got even more entries in Start/Search; none of which I can remove because the old ones are welded into the OS.

It’s 2026 and Windows still has:

  • CMD (40‑year‑old DOS shell)

  • Windows PowerShell 5.1 (legacy, can’t uninstall)

  • Windows PowerShell (x86)

  • PowerShell ISE (x86 + 64‑bit)

  • PowerShell 7 (the one we’re actually supposed to use)

  • Terminal (which isn’t a shell, just another launcher)

Why do I need six different ways to open a prompt? Why can’t I hide or remove the legacy ones? Why does “PowerShell” in search show me everything except the one I actually want?

If Microsoft wants PowerShell 7 + Terminal to be the future, then clean up the past. Let us hide/remove the old shells and make Terminal actually synonymous with the modern environment instead of a front‑end for a pile of legacy executables.

This shouldn’t still be a thing.


r/PowerShell • • Sep 02 '22

Script Sharing IT and user support GUI made with XAML and Powershell

Thumbnail
joseespitia.com
165 Upvotes

r/PowerShell • • Jun 26 '20

Script Sharing Powershell + Jupyter Notebooks .. uhh YES!

Thumbnail
youtube.com
165 Upvotes

r/PowerShell • • Mar 16 '20

Microsoft is gonna delete thousands of scripts from TechNet Gallery by June 2020

Thumbnail self.sysadmin
163 Upvotes

r/PowerShell • • Aug 15 '19

OP PowerShell Intro Course.

163 Upvotes

Hi all!

A few years ago (god I'm old) I asked for the help of this community in creating some PowerShell introduction training (https://www.reddit.com/r/PowerShell/comments/6cgdbz/op_powershell_training_course/).

It was a great success! Well now I'm in a DevOps role and I'm older (maybe wiser) and done a year and a half as a technical trainer... so I've redone the course.

You can see the repo here: https://github.com/Sudoblark/Powershell_Intro_Training

May be useful for anyone starting out, or for trainers looking to deliver PowerShell content (i've storyboarded all the workshops).


r/PowerShell • • Jun 23 '19

Script Sharing poshwal now has initial support for the new Windows Terminal - PowerShell in style!

163 Upvotes

r/PowerShell • • Aug 03 '20

Script Sharing WSUS cleanup, optimization, maintenance, and configuration script

162 Upvotes

Windows Server Update Services (WSUS) is incredibly unreliable out of the box, so I've made several scripts to maintain it over the years. I decided to combine them and clean them up to hopefully help out others.

https://github.com/awarre/Optimize-WsusServer/

This is the first script I've ever released to the public, so any feedback and advice would be appreciated.

This is free and open source, and always will be. MIT License

---

Features

  • Deep cleaning search and removal of unnecessary updates by product title and update title.

  • IIS Configuration validation and optimization.

  • WSUS integrated update and computer cleanup.

  • Microsoft best practice WSUS database optimization and re-indexing.

  • Creation of daily and weekly optimization scheduled tasks.

  • Removal of device drivers from WSUS repository (greatly improves speed, reliability, and reduces storage space needed).

  • Disable device driver synchronization and caching.


r/PowerShell • • Jun 18 '20

Was testing REGEX, when suddenly...

162 Upvotes

I realized I might still be 12.

PS C:\> 'ob' -match '(.)(.)' ; $Matches
True

Name                           Value
----                           -----
2                              b
1                              o
0                              ob

r/PowerShell • • May 19 '19

Daily Post How I didn't knew how powerful and fast hashtables are

Thumbnail
evotec.xyz
162 Upvotes

r/PowerShell • • Jul 04 '21

News NEW VSCode extension "Blockman" to highlight nested code blocks

161 Upvotes

Check out my VSCode extension - Blockman, took me 6 months to build. Please help me promote/share/rate if you like it. You can customize block colors, depth, turn on/off focus, curly/square/round brackets, tags, python indentation and more.....

https://marketplace.visualstudio.com/items?itemName=leodevbro.blockman

Supports Python, R, Go, Dart, PHP, JavaScript, JSX, TypeScript, TSX, C, C#, C++, Java, HTML, CSS and more...

This post in react.js community:

https://www.reddit.com/r/reactjs/comments/nwjr0b/idea_highlight_nested_code_blocks_with_boxes/


r/PowerShell • • Sep 01 '20

How I got my 6 year old to practice the alphabet

161 Upvotes
Add-Type -AssemblyName System.Speech
$Speech = New-Object System.Speech.Synthesis.SpeechSynthesizer
$Alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.ToCharArray() -as [string[]]

while($true) {
    $Letter = $Alphabet[(Get-Random -Minimum 0 -Maximum $Alphabet.Count)]
    $Assignment = "Press the letter $Letter"
    $Speech.Speak($Assignment)
    $Answer = Read-Host -Prompt $Assignment
    if ($Answer.Length -gt 0) {
        if ($Letter -eq $Answer) {
            $Speech.Speak("Correct! You pressed the letter $Answer.")
        } elseif ($Answer -in $Alphabet) {
            $Speech.Speak("Incorrect. You should have pressed $Letter, but you pressed $Answer.")
        } else {
            $Speech.Speak("That was not a letter.")
        }
    } else {
        $Speech.Speak("You did not press anything.")
    }
}

r/PowerShell • • Jan 14 '19

Question I want to help my husband advance his PowerShell skills but need help in what would be most beneficial for him.

161 Upvotes

First off, my apologies if this is the wrong sub for this question, and please redirect me if so.

Second, more apologies because I have next-to-no knowledge of coding, so if this all sounds super silly, it's due to my own ignorance and also the main reason I'm here: I don't even know what I don't know!

Anyways, quick backstory: about a year and a half ago, my husband switched careers. He now works in IT, mostly doing help-desk type tasks and setting up SAP accounts (does that sound right?). In his free time, though, he has been teaching himself PowerShell and has made some basic scripts to aid him in his job. His bosses have taken notice and he is going to implement a couple and introduce them to his team. I am so proud of him, though he is very nervous about it.

Our anniversary is approaching and I would like to buy him something that shows how proud and supportive I am of him for this effort and work. I am hoping to purchase something that will help him advance his skills in this area, but as you can probably tell, I do not know where to start.

Is there any particular book, subscription, program, class, etc. that I could get for him or enroll him in to help him become a stronger PowerShell coder? Am I even asking a valid question, or could he find out all he needs online?

Thank you for any help or redirection. Just want to show my guy how much I love and support him, especially in this new field he's learning.

Edit: he has been using the book PowerShell in a Month of Lunches. My apologies for not including that info before.


r/PowerShell • • Jun 07 '18

WSUS management with PowerShell

Thumbnail
happysysadm.com
161 Upvotes

r/PowerShell • • May 24 '18

PowerShell Foreach loops explained for Absolute Beginners

Thumbnail
winsysblog.com
161 Upvotes

r/PowerShell • • May 21 '18

News Microsoft Replacing Windows with Linux for PowerShell in the Cloud

Thumbnail
myitforum.com
161 Upvotes

r/PowerShell • • Nov 18 '17

PowerShell Core v6.0.0-rc Released! That's right: Release Candidate!!!

Thumbnail
github.com
161 Upvotes

r/PowerShell • • 7d ago

News Windows PowerShell 5.1 Deprecation

160 Upvotes

Windows PowerShell 5.1 is deprecated. It's no longer in active development. Windows PowerShell 5.1 is still part of Windows, and it's still supported. It will continue to receive security updates according to the lifecycle of each version of Windows. Scripts and tools that rely on it will continue to run.

Windows PowerShell 5.1 will be removed from a future version of Windows. Timing will be based on usage data and communicated in advance.

Microsoft recommends upgrading to PowerShell 7, the upgrade from Windows PowerShell 5.1. For more information, see Migrating from Windows PowerShell 5.1 to PowerShell 7.

Timeline

2026: Windows PowerShell 5.1 is deprecated. Windows Server 2025 and Windows 11, version 26H2 are the last versions of Windows to include PowerShell 5.1 enabled by default.
Next Version of Windows: Windows PowerShell 5.1 will be available as a Feature on Demand (FOD), enabled by default on new Windows installs.
Future Version of Windows: Not available.

https://support.microsoft.com/en-us/servicing/os/windows/docs/2026/11/kb5137172-windows-powershell-5-1-deprecation

At the moment there are many, many Windows management PowerShell modules built in to that aren’t supported in PowerShell 7 - they are either completely untested, or they only work via the (PowerShell 5.1 dependent) compatibility layer. Does this mean we can expect new native modules, or everything to just break? #notholdingmybreath

Affected modules:
- Domain Controller deployment (ADDSDeployment)
- ADFS
- AppLocker
- AppvClient
- BestPractices
- ClusterAwareUpdating
- ConfigCI
- DFSR
- DhcpServer
- DISM (presently has issue with MSIX installer)
- FailoverClusters, FailoverClusterSet
- GroupPolicy
- Both IIS management modules (IISAdministration, WebAdministration)
- IpamServer
- iSCSI, IscsiTarget
- ISE
- Microsoft.PowerShell.ODataUtils
- MsDtc
- NetLldpAgent
- NetWNV
- NetworkController, NetworkControllerDiagnostics
- NetworkLoadBalancingClusters
- PersistentMemory
- PKI
- Provisioning
- PSDesiredStateConfiguration (partially supported)
- PSScheduledJob
- PSWorkflow, PSWorkflowUtility
- RemoteAccess
- RemoteDesktop
- ServerCore
- ServerManagerTasks
- SMS
- StorageBusCache
- StorageMigrationService
- StorageReplica
- SystemInsights
- TLS
- UpdateServices

EDIT: The following PowerShell modules are also currently Windows PowerShell 5.1 only:

- AzureADHybridAuthenticationManagement
- SharePoint Online Management Shell
- Power Platform admin modules
- Systems Center Operations Manager (SCOM)
- Systems Center Virtual Machine Manager (SCVMM)
- Entra Connect (Azure AD Sync)

https://learn.microsoft.com/en-us/powershell/windows/module-compatibility?view=windowsserver2025-ps

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_windows_powershell_compatibility?view=powershell-7.6


r/PowerShell • • Jul 26 '20

Misc Made Conway's Game of Life in good ol' Powershell!

160 Upvotes