PowerShell - Docs - Learning-Powershell at Master PowerShell - PowerShell GitHub
PowerShell - Docs - Learning-Powershell at Master PowerShell - PowerShell GitHub
. .
README.md
Learning PowerShell
Whether you're a Developer, a DevOps or an IT Professional, this doc will help you getting started
with PowerShell. In this document we'll cover the following: installing PowerShell, samples
walkthrough, PowerShell editor, debugger, testing tools and a map book for experienced bash users
to get started with PowerShell faster.
The exercises in this document are intended to give you a solid foundation in how to use PowerShell.
You won't be a PowerShell guru at the end of reading this material but you will be well on your way
with the right set of knowledge to start using PowerShell.
Installing PowerShell
First you need to set up your computer working environment if you have not done so. Choose the
platform below and follow the instructions. At the end of this exercise, you should be able to launch
the PowerShell session.
For this tutorial, you do not need to install PowerShell if you are running on Windows. You can
launch PowerShell console by pressing Windows key, typing PowerShell, and clicking on
Windows PowerShell. However if you want to try out the latest PowerShell, follow the
PowerShell on Windows.
Now you have learned the basics of PowerShell. Please continue reading if you want to do some
development work in PowerShell.
PowerShell Editor
In this section, you will create a PowerShell script using a text editor. You can use your favorite editor
to write scripts. We use Visual Studio Code (VS Code) which works on Windows, Linux, and macOS.
Click on the following link to create your first PowerShell script.
PowerShell Debugger
Debugging can help you find bugs and fix problems in your PowerShell scripts. Click on the link
below to learn more about debugging:
PowerShell Testing
We recommend using Pester testing tool which is initiated by the PowerShell Community for writing
test cases. To use the tool please read Pester Guides and Writing Pester Tests Guidelines.
New-Item -ItemType
mkdir Create a new folder
Directory
Get-Content test1.txt,
cat test1.txt test2.txt Display files contents
test2.txt
Remove-Item
rm -r <folderName> Delete a folder
<folderName> -Recurse
Get-ChildItem -Recurse -
grep -Rin "sometext" -- Filter *.cs Recursively case-insensitive search
include="*.cs" | Select-String -Pattern for text in files
"sometext"
Invoke-RestMethod
curl https://github.com Transfer data to or from the web
https://github.com
Commercial Resources
Windows PowerShell in Action by Bruce Payette
Introduction to PowerShell from Pluralsight
PowerShell Training and Tutorials from Lynda.com
Learn Windows PowerShell in a Month of Lunches by Don Jones and Jeffrey Hicks
Learn PowerShell in a Month of Lunches by Travis Plunk (@TravisEz13), Tyler Leonhardt
(@tylerleonhardt), Don Jones, and Jeffery Hicks