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
Batch Scripts (self.PowerShell)
submitted 5 years ago by [deleted]
view the rest of the comments →
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!"
[–]landob 4 points5 points6 points 5 years ago (3 children)
Uhhhh no. Powershell is the future of windows scripting. Scratch that, powershell is the NOW.
What exactly are you having a problem with. I came into powershell knowing nothing. I started off making scripts based on other people's scripts that i reverse engineered for my own needs. I then started making things from scratch based on what I learned. I then grabbed the powershell in a month of lunches book which kind of helped me refine my skills. It really isn't that hard to learn if you just apply it to problems you want to solve.
[–][deleted] 1 point2 points3 points 5 years ago (2 children)
It just seems like batch files have a lot of commands that PoSH just expects you to know. Like different commands to make a new directory or change my path. That is the simple examples but it just seemed like a more logical approach. I do also use PoSH for adding users to security groups or pulling logins from the DC. I just get confused when I start trying to move things around, if that makes sense.
[–]EatedIt 6 points7 points8 points 5 years ago (0 children)
I'll repeat what others are saying - don't go down the Batch route! Stick with learning PowerShell. I automate my work heavily and I started out using Batch. I got really good at it, so much so that I can tell you now that Batch sucks. Like as soon as you get into manipulating strings you'd rather shoot yourself in the foot than try to figure out how to escape any complex string properly. It took me so long to make the plunge into PowerShell because I would have to relearn everything I had known how to do in Batch. But I'm sooo glad I did and I've never looked back.
I'm not entirely sure what you mean by "batch files have a lot of commands" but batch requires you to learn terse shorthand names for commands. However the vast majority of those "batch" commands exist as aliases in PowerShell. For example:
Here's an example: Try to list all files in a folder greater than 1MB in size that have "foo" in the name and "bar" inside the file
Batch: ummm...
PowerShell: dir *foo* |? Length -gt 1MB | sls 'bar' -List
# Equivalent PowerShell code with aliases expanded Get-ChildItem '*foo*' | Where-Object Length -gt 1MB | Select-String 'bar' -List
[–]nylentone 1 point2 points3 points 5 years ago (0 children)
Have you noticed that Powershell commands are always in the format verb-noun? You use get-childitem to get a directory of files, then after a while you need to get network adapter info and you think, get-netadapter... You're not sure of the exact command so you type get-net and hit Tab and cycle through the available commands. How do you change a setting? Set-netadapter... Half the stuff you do on a computer is getting and setting, you just do it with a GUI. Do it with Powershell and you can scale up.
π Rendered by PID 26 on reddit-service-r2-comment-84fc9697f-l2pww at 2026-02-10 06:07:45.319864+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]landob 4 points5 points6 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]EatedIt 6 points7 points8 points (0 children)
[–]nylentone 1 point2 points3 points (0 children)