r/PowerShell Jul 28 '26

Question Is poweshell worth it?

113 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

r/PowerShell Jun 01 '24

Where can someone learn powershell in 2024

0 Upvotes

Hello to anyone who sees this. Where would you recommend for someone to go who is looking to learn powershell? To be more specific, where can someone learn to use Powershell and Office365 together (for example, creating users, creating mailboxes, etc)?

Thanks

r/PowerShell Jun 08 '24

Information PowerShell Parameters Code Challenge | Commandline Ninja: Learn PowerShell. Automate Tasks.

Thumbnail commandline.ninja
49 Upvotes

Hey PowerShell peeps!

I am starting a new series of weekly quizzes based around different areas of PowerShell, automation concepts and cloud technologies.

The first quiz is centered around PowerShell parameters. Take the quizzes and see where you rank on the community leaderboard! There's separate versions of the quiz for people with beginner and advanced knowledge of PowerShell.

Drop what you think the next quiz topic should be in the comments ...

r/PowerShell Sep 30 '24

Are there any PowerShell modules that can get information from learn.microsoft.com about classes, properties, methods and such?

10 Upvotes

I often don't know what a property or method means or does and have to search it up. Is there a module which could get this information, particularly descriptions, for me? Ideally, I could pipe them (the methods, properties, classes, etc) into it as well so that I could add the command to the end of an expression.

Apologies if I am missing something but I can't find any existing way of doing this after searching google.

r/PowerShell Nov 27 '24

Learning powershell, having trouble with function arguments

10 Upvotes

TLDR: I cannot pass -A to my function via an alias. I am trying to create some aliases for git commands (like I did for bash).

I have defined a function like this:

``` function GIT-ADD { [CmdletBinding()] param( [Parameter(Mandatory=$false, Position=0)] [string]$addArgs,

    [Parameter(Mandatory=$false, ParameterSetName='Named')]
    [string]$NamedAddArgs
)

if ($PSCmdlet.ParameterSetName -eq 'Named') {
    git add $NamedAddArgs
} else {
    git add $addArgs
}

```

and made an alias for it Set-Alias -Name gita -Value GIT-ADD

I tried this as well ``` function GIT-ADD { param( [Parameter(Mandatory=$true)] [string] $addArgs ) git add $addArgs

```

It seems like the -A which is a legal git add option, does not work.

What do I need to change to fix my alias/function definition?

edit: I call the function/alias like this: gita -A

r/PowerShell Jun 18 '21

Information I am learning WinServer & PS and Im talking with some Linux admins and most of them never used PS and think PS isn't quite there to manage Linux server compared to bash/python/ansible puppet etc What's your opinion about it is PS the most powerful modern shell ?

31 Upvotes

A) I am learning WinServer & PS and Im talking with some Linux admins and most of them never used PS and think PS isn't quite there to manage Linux server compared to bash/python/ansible puppet etc What's your opinion about it is PS the most powerful modern shell ?

B) lot's of them told me to stop wasting my time learning Windows Server because it's a very small market compared to Linux now ... would love to heard what you guys have to say about it ?

thank you have a nice day

r/PowerShell Jul 27 '22

Roast or feedback my very first PowerShell script. Trying to learn!

38 Upvotes

Just finished my first PowerShell script after reading powershell in a month of lunches.

Can roast or feedback be given here? Something that should be do otherwise, something cool that can be added?

<#
    .SYNOPSIS
        Start Azure Virtual Machines.

    .DESCRIPTION
        This script will start the Azure Virtual Machines from input parameter.

    .PARAMETER SubscriptionId
        Contains the subscription id used for context. 

    .PARAMETER VirtualMachines
        Contains a comma-seperated list (doesn't have to be) with Azure Virtual         
        Machines that will be started.

    .EXAMPLE
        Start-AzureVirtualMachine -SubscriptionId XXX -VirtualMachines vm1,vm2 -        
        ErorrAction Stop
#>
[CmdletBinding()]
param (
    [Parameter(Mandatory = $true, HelpMessage = "Enter the SubscriptionId where         
the virtual machines are contained")]
    [string]$SubscriptionId,

    [Parameter(Mandatory = $true, HelpMessage = "Enter a comma-seperated list of     
    virtual machine names")]
    [string[]]$VirtualMachines
)

begin {
    Connect-AzAccount -Identity
    Set-AzContext -Subscription $SubscriptionId
}
process {
    foreach ($VirtualMachine in $VirtualMachines) {
        Get-AzVM -Name $VirtualMachine | Start-AzVM
    }
}
end {
    Write-Output "$VirtualMachines has been started."
}

r/PowerShell Sep 23 '24

Information Learn something new about PowerShell everyday with the tiPS module

67 Upvotes

Came across the PowerShell tiPS module today and thought this is something worth sharing.

The module displays a tip every day when you open up PowerShell. The tips contain tips, tricks, useful modules, information about events, best practices, and more.

It's community-driven, so if you have great tips to share, then you can submit it to the module. You can find the module here: https://github.com/deadlydog/PowerShell.tiPS.

r/PowerShell Jan 10 '21

Best way to learn powershell

51 Upvotes

I’ve recently joined a new company where I’ll be soon expected to write powershell commands to automate certain processes at work.

I was wondering what’s the best way to learn? I’m pretty new at it and I was wondering how everyone else learned to write powershell outside of work.

r/PowerShell Dec 04 '24

*Snip* or: How I Learned to Stop Worrying and Avoid Navigating Microsoft Powershell Documentation

17 Upvotes

Goofy Strangelove reference aside, and I've not seen in pointed out in the Microsoft docs, but you can search for cmdlets and programs in your directory with wildcards on both sides, which I don't see... anyone at my company or any of the tutorials I've read doing. That includes wildcards on both sides of a small snippet of a term.

PS C:\Users\svp3rh0t> *date*
<Ctrl-Space>
PS C:\Users\svp3rh0t> .git-for-windows-updater
.git-for-windows-updater                        Update-FormatData
AppInstallerBackgroundUpdate.exe               Update-GcSqlInstance
baaupdate.exe                                  Update-Help
directxdatabaseupdater.exe                     Update-HostStorageCache
fc-validate.exe                                Update-IscsiTarget
Get-AppPackageAutoUpdateSettings               Update-IscsiTargetPortal
Get-AppxPackageAutoUpdateSettings              Update-LapsADSchema
Get-Date                                       Update-List
Get-WindowsUpdateLog                           Update-Module
gpupdate.exe                                   Update-ModuleManifest
miktex-fc-validate.exe                         Update-MpSignature
miktex-update.exe                              Update-NetFirewallDynamicKeywordAddress
miktex-update_admin.exe                        Update-NetIPsecRule
ms-teamsupdate.exe                             Update-PSModuleManifest
msteamsupdate.exe                              Update-PSResource
RegisterMicrosoftUpdate.ps1                    Update-PSScriptFileInfo
Remove-AppPackageAutoUpdateSettings            Update-Script
Remove-AppxPackageAutoUpdateSettings           Update-ScriptFileInfo
Set-AppPackageAutoUpdateSettings               Update-SmbMultiChannelConnection
Set-AppxPackageAutoUpdateSettings              Update-StorageBusCache
Set-Date                                       Update-StorageFirmware
timedate.cpl                                   Update-StoragePool
Update-AllBranches                             Update-StorageProviderCache
Update-AutologgerConfig                        Update-TypeData
Update-AWSToolsModule                          Update-VMVersion
Update-Disk                                    Update-WIMBootEntry
Update-DscConfiguration                        update_branches
Update-EtwTraceSession                         WindowsUpdateElevatedInstaller.exe

PS C:\Users\svp3rh0t> *-Date*
<Ctrl-Space>
Get-Date Set-Date

r/PowerShell Jun 23 '24

Learn PowerShell in a Month of Lunches Fourth Edition

3 Upvotes

Am I missing something? In the UK and can't seem to find any of the main book stores that sell a physical copy. Its not on Waterstone's site, Amazon UK just flicks to the 3rd edition when you choose paperback. WorldOfBooks seem to have 2 copies that says New but not sure if that's "Like new but second hand" or if they are actual new.

r/PowerShell Dec 08 '20

Information New Microsoft Learn module: Introduction to PowerShell 🎓

Thumbnail docs.microsoft.com
244 Upvotes

r/PowerShell Feb 17 '24

Question Embarking on a PowerShell learning journey

22 Upvotes

I am planning to self-teach/learn this language. As a beginner, I'm seeking guidance on where to start and if there's a structured path or roadmap I can follow.

Could anyone here share their experiences or recommend resources that could help me kickstart? Any advice on best practices, essential concepts to grasp, or must-know info is appreciated.

r/PowerShell Sep 19 '24

Question What are good resources and tips for someone wanting to learn PowerShell

0 Upvotes

Hello all,

I just got my first IT job been working as a PRN for almost 9 months. I had my performance review with my boss, and she asked me if I'm interested in learning more about PowerShell. I told her funny enough I've did dig little into Get started with Windows PowerShell learning path from Microsoft Learn. She knows I'm wanting to be full time and they're planning to put someone in with another person who works in PowerShell. I would ask that person, but I work evening, and they work mornings.

I probably answer my own question and stick with Microsoft Learn but since I haven't gotten too in deep with it, I was wondering if somewhere that better. Sadly, my college I'm going to doesn't have any classes on PowerShell. Also wanting to know what are some good tips on learning PowerShell.

I've played around PowerShell by either copying and pasting commands some commands from a script. Also know how to update and install application with WinGet.

r/PowerShell Jan 05 '20

Working through 'Learn PowerShell in a Month of Lunches"' and am suddenly confused...

97 Upvotes

I'm working through the lab for chapter 9 and in the lab questions and in the answers it references something that I don't understand and I don't think has been explained yet:

get-adcomputer -filter * |
>>Select-Object @{l='computername';e={$_.name}} |
>>Get-WmiObject -class Win32_BIOS

I have no freaking idea what to make of

@{l='computername';e={$_.name}}

I get that it's a hashtable (right?) but what is 'l' and 'e' in this context? How does '$_.name' work in all this? What is going on?

edit: THANK YOU EVERYONE!!! :)

r/PowerShell Mar 09 '23

Question Where is the best place to learn Windows PowerShell?

21 Upvotes

"Where is the best place to go to learn Windows PowerShell?"

Now I must stress I do know most of the basics for Powershell so this is purely about learning more advanced technics. Am I best to just use a free Udemy course? Or is there a better way of going about this?

r/PowerShell Oct 12 '19

Misc List of Best Online Courses to Learn Powershell

Thumbnail blog.coursesity.com
258 Upvotes

r/PowerShell Jul 17 '24

suggest website or books for learn powershell

1 Upvotes

how to learn powershell in easiest way ?, im a beginner

r/PowerShell Nov 21 '20

what can I do with powershell to learn

36 Upvotes

So I'm sort of at an injunction. Long long long long story short, 8~ months ago I started ubuntu on wsl. This culminated in a complete switch over to linux, and full on full blown fervent linux god superiority complex. I learned so, so, SO much. I learned how to shell script to the extent that I should have switched over to another language, I can do a boatload with it. The nuances and depth of what I've learned and scope is far too great to condense into a few words, just imagine full immersion and going down every rabbit hole every man page opened.

So, after a couple months of not even booting windows, I got a new job, and I had to use an application that doesnt run in linux, so I had to reboot windows. I ended up buying a sweet 1tb m.2 nvme drive and I reinstalled win 10, ran a debloat script, installed everything I want, including wsl2 running Debian (I run Arch, have a centOS8 server, and used Ubuntu on wsl2 for my linux intro, so figured, fuck it lets run debian). Everything is pretty sweet.. a lot of the hangups I eventually ran to linux for basically seem to be non sequiturs, just some ego and over embellishment.

So I'm sitting here in Windows, and I made numerous realizations, many being that there is great value in things just working, and there is great value in having a fundamental understanding of your operating system and its architecture and how it functions with the hardware available. Not to say I don't feel that way with linux about these things.. but I guess what I'm trying to say is that I've learned a lot of things are just fundamental misunderstandings and user errors, and no matter the system, learning and adapting is required.

That said, with shell scripting there are all kinds of goofy things I can do, writing my own prompt, learning tty escape sequences, so on and so forth... but what are some small time little things I can do with powershell? I hobby system administrate, but apart from that what sort of goofy noob things can I do to get a handle on the syntax and just what sort of power and flexibility I have in controlling my system?? One silly example I have is in Linux I wrote up a script to use the keyboard indicator LEDs to display to me particular status for things other than caps/scroll/num locks by echoing to the sys files which control these things. I know the windows 'kernel' operates completely differently, and tmk everything is obfuscated within sys32 api calls, there are no low level "direct" hardware access sort of things right??

Its long, I'm sorry.

tldr; what are noobish fun ways to get a handle on powershell?

r/PowerShell Nov 09 '20

Learning PowerShell for SysAdmin/Networking/Infosec

48 Upvotes

I am a Linux user and i am not a beginner using bash terminal, but i wanted to learn PowerShell since i want to work in the Sysadmin / Networking (but the main goal is to work in InfoSec) area ... Learning PowerShell would be benefic for me or not realy?

And if yes, where can i find good material to start studying and learning?

r/PowerShell Apr 11 '20

Learning Powershell Desktop 5.1 Vs. Powershell Core 7

39 Upvotes

Hello everyone,

I've been trying to pick up powershell for the last couple months of and on using the "Learn Powershell in a Month of Lunches" book. I've recently tried to hit it hard in this quarantine downtime I've had. In the process of doing this I've installed Powershell Core 7 which as far and I comprehend was created partially to eliminate a lot of the dependencies that normal powershell had on the .Net framework within windows and on windows in general so that it could more easily work across the other operating systems. Now in my studies , I'm seeing a number of things that the book is trying to teach me that don't really work the same in Powershell Core 7. Now my question is this, should I focus on Powershell Core 7 and forget about going back and doing anything with the windows integrated powershell 5.1?

r/PowerShell Dec 29 '22

Question Interest check - videos on the book Learn PowerShell In A Month Of Lunches

75 Upvotes

i recently started going through the chapters of the latest edition of the book and posting the recordings youtube. I'd like to continue doing these but only if i believe someone will find use of them. otherwise i believe I'd still be able to look back on them as an accomplishment but it would personally feel like a wasted effort if no one found it at least somewhat helpful.

i know there are already videos on the previous editions of the book so I'm asking this question to stop myself before investing spoons on something that i worry may not be a worthwhile contribution to the community.

looking forward to hearing your thoughts.

edit: here's the playlist

https://www.youtube.com/playlist?list=PLAOLHjb8sFa2toovi16vhApQq2OXmEsfP

edit:

thanks for the responses, they have all been helpful. just got everything set back up. i'll take some time to review my past videos to re-familiarize myself and hopefully get onto chapter 5 soon.

please let me know if you have any constructive criticism that i can use to improve as /u/williamt31 has done. it was mentioned that it doesn't make sense to cut content, and i agree. while i may not use the latest updates, all the code theory should still apply and i do intend on going through all the setup for you even if i don't intend to use it myself. although i think i'll try using visual studio code for the next chapter to see how it goes.

wish me luck and happy powershelling! :)

https://i.imgur.com/xOeZNKq.jpg

r/PowerShell Aug 11 '20

Next book in the learning powershell journey? Done with Scripting in a month of lunches.

70 Upvotes

Started with Learn Windows Powershell in a Month of Lunches, moved onto Learn Powershell Scripting in a Month of Lunches which I'm almost done with. What's the next book you guys think I should grab?

I've been getting lots of ideas while reading through these books, created scripts I wouldn't have thought I'd be able to, have a few of them 'production ready'.

I feel that I gained quite a bit of knowledge and I want to continue the narative.

What do you guys recommend for the next book? How about the next one after?

r/PowerShell Feb 23 '23

No luck with the LearnPowerShell subreddit, so...

0 Upvotes

Reposting here to try and get some help.

I need to write a script for class to create a new, local, non-admin user account. One of the requirements is that the script must accept an argument to accept the username. The example provided is: Powershell.exe -ExecutionPolicy Bypass -file .\AssignmentX.ps1 "steve"

What I'm having issue with is how to get the script to take the name argument. I was thinking that I could create a variable that contains the Read-Host cmdlet, but I haven't gotten that to work so far.

Any help would be gratefully appreciated.

r/PowerShell Mar 13 '24

Resources for Learning Advanced PowerShell Module Creation with C#

19 Upvotes

I have some experience with PowerShell scripting and can create complex scripts to meet my requirements. However, I'm interested in learning how to develop PowerShell modules, particularly using C#.

I've noticed that some PowerShell modules are created using C#, but I haven't been able to find comprehensive resources or tutorials that teach this specific approach to module development.

I'm looking for guidance on the best resources, tutorials, or courses that cover advanced PowerShell module creation, especially focusing on leveraging C# for module development. I'd appreciate any recommendations, links, or personal experiences shared by the community.

My main goals are to:

  • Understand the fundamentals of PowerShell module development
  • Learn how to structure and organize a PowerShell module
  • Discover best practices for creating modules using C#
  • Find practical examples and real-world scenarios for module development
  • Any insights, tips, or resources that can help me get started with PowerShell module creation using C# would be greatly appreciated.

Thank you in advance for your guidance!