this post was submitted on 23 Aug 2024
735 points (97.7% liked)

Technology

59598 readers
3513 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 5 points 3 months ago* (last edited 3 months ago) (1 children)

It is verbose. It's intended to be readable by untrained people, with a consistent verb-subject format for commands (e.g. Get-ChildItem, Set-Variable), though it turns out that concept doesn't scale very well and the format gets increasingly broken when you get into the Azure PowerShell commands (New-AzLoadBalancerInboundNatRuleConfig).

The real power of PowerShell is that it can interact with .NET directly (because it is .NET), which allows you to quickly and easily build scripts for anything that uses .NET (like Windows). For instance, you can view or edit registry keys of other systems through a PowerShell remote session (using the .NET RegistryKey class), and set up a loop to edit a registry key across a list of machines remotely (I used to do this while managing on-prem AD groups in my last job, it's much faster and easier than trying to change registry keys through remote desktop sessions, more reliable because it's programmatic, and you can easily log the command output and catch any systems that failed to accept the change).

PowerShell might not be what Bash is for the average Linux user, but it's a massive improvement for managing Windows systems at scale. Anyone who works in corporate IT should learn PowerShell.

[โ€“] [email protected] 2 points 3 months ago

For instance, you can view or edit registry keys of other systems through a PowerShell remote session (using the .NET RegistryKey class)

It's like a built-in Ansible equivalent (the configuring and management part at least). I'll agree that's neat. If I managed a fleet of Windows machine, I would properly learn that.

But I don't think it's something for the average home user. And the Linux way of configuring remote machines is too easy.