PowerShell for Total Beginners
PowerShell for Total Beginners
About the Book
If you don’t know PowerShell, you’re getting left behind.
PowerShell is absolutely everywhere. It’s embedded in Microsoft products. You’ll find it in Exchange, SharePoint, SQL, Skype for Business and Lync, Windows Server itself, and even third party software has jumped on the bandwagon.
In fact, some Microsoft products use PowerShell as their primary management interface. Sometimes there are features to configure or settings to administer that you just can’t get to via the GUI anymore. That’s how far PowerShell has come.
So it’s time to face the bottom line: if you administer or use Windows products from any sort of management perspective, you’re going to use PowerShell at some point. Or you won’t be able to do your job. It’s really that simple.
If you don’t learn PowerShell now, then when?
Hey, I get it. Learning a new scripting language doesn’t pay the bills. You have to put out fires, remove that pesky Cryptolocker malware, increase everyone’s mailbox quota by 10 GB a piece because these damn iPhones take such high resolution pictures, move a bunch of data up to Office 365, make sure everyone’s Dropbox accounts are locked down–and that’s only before lunch.
Except…Learning PowerShell will pay the bills.
Now, I don’t like speaking from a fear perspective. I want you to want to learn PowerShell. I want you to be convinced it’s the best thing since sliced bread. (I don’t know that it is, though, because I really like a good sandwich.)
The issue is, plenty of other people already made up their mind. Hiring managers have. Other employee candidates have. PowerShell experience is a requirement for many–dare I say most–job postings in this new economy. If you want a new system administrator position, or if you want to move up in the ranks to management or grow your experience elsewhere, you have to have PowerShell chops in order to fit in.
And if you’re a consultant or you manage a lot of systems, you are actually costing yourself money by not working in the most efficient way possible. Do you bill by the hour? Do you regularly set up production systems for new clients? Do you have a script that lets you do it in five minutes, or do you sit there manually and take a whole weekend to on-board a new client?If you can’t do your job without a GUI, you’re at the end of the road.
The GUI is dead. We can have a funeral and lament the good ole days of Remote Desktop to 15 different servers at one time, or we can learn how to move forward with PowerShell. I vote for that.
Trouble is, lots of people never take the time to actually learn PowerShell. Rather, they just start trying to look up commands one at a time. How do you add a mailbox to Exchange? How do you add new users to your network? How can I run the same command on all ten of my domain controllers?
And so they Google and Bing for answers and they find some that are sort of applicable, but don’t fully work in their environments. They run the examples, they fail, the error messages are cryptic, and they give up in frustration. It’s impossible to learn PowerShell by sound bite, after all. And they think to themselves, “who has time to learn this stuff?”
I took the time to ask some folks what their biggest hang-ups with PowerShell were right then and there. I wanted to understand what was holding people back. I got a lot of answers, and I saw some clear themes develop. Some of the most common answers I got looked a lot like the following:
- “I’m not a developer so these scripts look like greek to me.”
- “I don’t have time to learn PowerShell well.”
- “I’m not sure how to apply PowerShell to my daily work.”
- “It’s so big! How can I remember everything?”
- “I have no idea where to find help and the documentation is poor or intimidating, or both!”
And if you’ve spent only ten or 15 minutes with PowerShell, it’s easy to see how those are your main takeaways from your experience.
But it doesn’t have to be that way.
You don’t have to be a developer. You don’t have to have a lot of time to learn PowerShell. You can apply PowerShell almost immediately. You don’t have to remember every command. And the help you actually need is right around the corner.
I can show you how, and why, all of those things are true in my new book and video series.
PowerShell for Total Beginners is my custom built, handcrafted, painstakingly curated book and video series designed to get you from total PowerShell newbie to confident and open PowerShell user in as little as four weeks.
The PowerShell for Total Beginners book I can sum up in one way:
It’s PowerShell as I would like to have learned it.
I’m not a developer. I was a system administrator for a Research I university for a while, I was a SharePoint administrator, and I’ve been covering Microsoft and Windows Server from an IT pro perspective for 16 years now. I saw the importance PowerShell was gaining in the industry and I wanted to learn it.
I wanted to learn it so much, in fact, that I went out and bought basically every beginner resource that I could get my hands on. I bought books that promised I could learn in 24 hours, in a month of hour long sessions, in three weeks, and that I’d know everything at the end. I bought books geared toward idiots because I thought that would be a good place to start.
I’ll be honest with you–every single one of them disappointed me in some way. Every one.
I didn’t learn PowerShell well. I certainly didn’t learn it in 24 hours, or even a month. Sure, I picked up bits and pieces, but the overwhelming feeling I got from these books is that they assumed too much knowledge on my part. They thought I would know what an int32 was. They thought I’d be able to figure out what modules and variables were. And what the hell is a pipe character?
There were some great books for the advanced beginner, but for a guy with no development experience and no prior knowledge of PowerShell, I felt lost.
I know why this is the case. Most programmers are absolutely terrible at teaching programming, and yet programmers are the ones writing the books. These guys and gals are so advanced and so in the dirt, so to speak, that they just cannot empathize with or imagine a complete beginner, a total non-programmer, non-developer wanting to learn anything. And so in their writing and their teaching they make giant leaps and bounds without even realizing it, leaving their students lost and frustrated and on the brink of giving up.
It occurred to me that I certainly couldn’t be the only one who actually was a newbie with zero development or scripting experience who recognized and acknowledged the need to learn PowerShell, but who needed a serious helping hand. So, given the lack of good–well, any as far as I could tell–resources on the market for that demographic, I decided to take action.
And that’s what PowerShell for Total Beginners is. It’s over 200 pages of PowerShell hand holding. If your grandmother cared anything about learning PowerShell, she could learn it from my book.
Writing this book was a labor of love. I wanted to create the authority for total beginners who needed to learn PowerShell. I wanted to create an elegant resource that assumed no prior knowledge. I wanted to create a learning point that covered every topic worth covering with a depth of explanation that is unparalleled by any book of course on the market. I wanted to create a product that would make even the skeptics of PowerShell come away at the end in love with the language and ready to take their skills to the next level. In the end, I did it and I’m proud of it.
- If you can’t do your job without a GUI, you’re at the end of the road.
- Learning PowerShell is hard. And it’s OK to admit that.
- What to Expect from This Book
- What’s Special About This Book
- Don’t Wait
Chapter 1: Getting Started and Setting Up
- Valid Platforms and Versions
Two Important PowerShell Tools
The PowerShell Integrated Scripting Environment (ISE)
- Getting the ISE Set Up
The Windows PowerShell Console
- Running the Console as an Administrator
- Setting Up the Windows PowerShell Console
- Running and Stopping Commands in the Console
- Windows PowerShell Console Caveats
- Tab Completion
- The PowerShell Integrated Scripting Environment (ISE)
- The Last Word
Chapter 2: The Basics of PowerShell
Some Terminology and Definitions
- A Little about Aliases
PowerShell Command Components
- Types of Parameter Values
- Some Parameters are Positional Parameters
- Optional Parameters
- Mandatory Parameters
- Parameter Sets – The Fork In The Road
- Common Parameters
- External Commands
- Commands Within Commands
Knowing Which Commands to Use and How to Use Them: Getting Help
- Looking at Help for a Known Command
- Looking for Help With an Idea or Concept
- Full, Unrestrained, Painstakingly Detailed Help
A Little Interactive Handholding:
- Understanding Error Messages
- Always Use Protection: Stopping You from Hurting Yourself
- The Last Word
- Some Terminology and Definitions
Chapter 3: The PowerShell Pipeline
- Introducing the Pipeline
Piping to the Screen and to Files
To the Screen:
- To the Screen:
Importing and Exporting Data for PowerShell to Work With
- Importing from Comma-Separated Values (CSV) Files
- Exporting to Comma-Separated Values (CSV) Files
- Converting Content
- The Last Word
Chapter 4: PowerShell Providers, Modules, and Snap-ins
- How Providers Work
- Provider Capabilities and Drives
- Differences in Providers Matter
- A Provider Example: The Registry
Introducing Modules and Snap-ins
- About Management Shells
- Your Profile: Your Favorite Snap-Ins and Modules, Automatically Loaded
- The Last Word
- Introducing Providers
Chapter 5: The Complete Beginner’s Guide to Objects
- What is an Object?
- Properties and Methods
Objects and the Pipeline
- Inspecting an Object’s Properties and Methods
- Limiting or Selecting
- Remembering What Kinds of Objects are in the Pipeline
- The Last Word
Chapter 6: Filtering and Limiting
The Syntax for
- The Syntax for
- Getting Lists and Filtering on Them
- Filtering, in a Pragmatic Sense
- Another Example of Objects and Filtering
- Further Exploration
- The Last Word
Chapter 7: Creating Simple Scripts
- Introducing Scripts in PowerShell
- Making Scripts Useful, Phase 1: Variables
Making Scripts Useful, Phase 2: If/Then, Do-While, and ForEach
- The If/Then Construct
- Do While Constructs
- The ForEach Construct
Putting It All Together: Scripts to Accomplish Something Useful
- Method 1
- Method 2
- A Simple Backup Strategy for Smaller Environment: Exporting Mailboxes
- Clearing the Requests
- The Last Word
Chapter 8: More Work with Objects
Comparing Two Objects
- Another Example
- Looking at
- Selecting a Certain Number of Objects
- Selecting Certain Properties
- Grouping Objects with Common Characteristics
- Hash Tables
- PowerShell in the Real World: Grouping and Comparing Objects
- The Last Word
- Comparing Two Objects
Chapter 9: To The Many, To The Few - PowerShell Remoting
- Introducing Remoting
- How Remoting Works
- Enabling PowerShell Remoting
- Remoting to One Computer at a Time
Remoting to Many Computers at a Time
- Specifying a Script File Instead of a Command
- Specifying a Separate List of Computers
The Caveats When Using Remote Commands
- Serialization and Deserialization Side Effects
- Remoting with Efficiency in Mind
- Remoting Needs Some Permission Sometimes
- The Last Word
Chapter 10: Useful PowerShell Tools
- Dell PowerGUI
- SAPIEN Technologies PowerShell Studio 2015
- Amazon AWS Tools for Windows PowerShell
- Microsoft Script Browser for Windows PowerShell ISE
- Adam Driscoll’s PowerShell Tools for Visual Studio
- Microsoft Windows PowerShell Web Access, via Control Panel
- PowerShell Training via the Microsoft Virtual Academy
- Master-PowerShell, an ebook from Dr. Tobias Weltner
- VMware vSphere PowerCLI
- The Last Word
Chapter 11: Using PowerShell to Manage Office 365
- Create a Script to Open a PowerShell Session to Office 365 in One Click
- Assign Rights to Mailboxes
- Converting Regular Mailboxes to Shared Mailboxes
- Obtaining Last Logon Times for Office 365 Accounts
- Onboarding a List of Multiple New Users to Your Office 365 Tenant
- Lock Down and Configure Sharing on a SharePoint Online Tenant
- Examining and Auditing Who Has External Access to a SharePoint Online Site
- Add and Remove People from Mailing Lists (Distribution Groups)
- Performing a Mass Password Change
- Place All Mailboxes on Litigation Hold
- The Last Word
Chapter 12: Wrapping Up - Performing Five Common Administrative Tasks using Windows PowerShell
- Adding Users
- Deleting Dangerous or Objectionable Content from Exchange Mailboxes
- Elegantly Handling Departed Employees and Their Distribution List Memberships
- Create a New Comma Separated Values (.CSV) File and Populate It With Data
- Easily Connect to Exchange Online or Office 365 from Your Hybrid Deployment
- Appendix X: Quick Cheat Sheet of PowerShell Verbs
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
El Manual del ManagerKeyvan Akbary, Félix López, and Álvaro Salazar
¿Has deseado alguna vez el haber tenido una buena introducción al rol del Engineering Manager? En este libro aprenderás lo necesario para ejercer el rol de una manera efectiva: Expectativas y Responsabilidades del Rol, 1-1s, Ayudar a Crecer, Objetivos, Planes de Carrera, Cultura, Feedback, Contratación, Cultura de Producto y mucho más.
Functional Design and ArchitectureAlexander Granin
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
Ansible for KubernetesJeff Geerling
Ansible is a powerful infrastructure automation tool. Kubernetes is a powerful application deployment platform. Learn how to use these tools to automate massively-scalable, highly-available infrastructure.
Ansible for DevOpsJeff Geerling
Ansible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Practical FP in Scala: A hands-on approachGabriel Volpe
A practical book aimed for those familiar with functional programming in Scala who are yet not confident about architecting an application from scratch.
Together, we will develop a purely functional application using the best libraries in the Cats ecosystem, while learning about design patterns and best practices.
Tame your Work FlowSteve Tendon and Daniel Doiron
Do you need a high performance enterprise governance approach improving management, execution and delivery while dealing with multiple projects/products, events, stakeholders and teams? Giving you better bottom line results, faster time to market, less work, better predictability, happier employees, and delighted clients? Then learn about TameFlow!
C++ Best PracticesJason Turner
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Cloud StrategyGregor Hohpe
“Strategy is the difference between making a wish and making it come true.” A successful migration to the cloud shouldn’t be driven by wishes, but guided by a sound strategy, frameworks, and decision models. This book tells you how—without becoming superficial nor getting lost in technology and product details.
Machine Learning EngineeringAndriy Burkov
"If you intend to use machine learning to solve business problems at scale, I'm delighted you got your hands on this book."
—Cassie Kozyrkov, Chief Decision Scientist at Google
"Foundational work about the reality of building machine learning models in production."
—Karolis Urbonas, Head of Machine Learning and Science at Amazon
Composing SoftwareEric Elliott
All software design is composition: the act of breaking complex problems down into smaller problems and composing those solutions. Most developers have a limited understanding of compositional techniques. It's time for that to change.
11 BooksThe Quality Software Bundle is for managers, would-be managers, and any of us who find themselves being managed and confused. This comprehensive bundle covers the entire span of software development approaches, from hacking through waterfall, cascade, prototyping, Iterative enhancement, reusable code, off-the-shelf, to Agile teams. The bundle...
The Node.js Bundle
3 BooksThis bundle combines three bestselling Leanpub Node.js books into a package that gives you everything you need to get started with developing Node.js applications at an unbeatable price.
The Tester's Library
8 BooksThe Tester's Library consists of eight five-star books that every software tester should read and re-read. As bound books, this collection would cost over $200. Even as e-books, their price would exceed $80, but in this bundle, their cost is only $49.99. Here are the books, and why they should be in your library: Perfect Software and Other...
11 BooksIn this bundle, you will find 10 different agile books. They are about different aspects of being agile. - finding a job - doing coding dojo's - Retrospectives - Personal kanban - a non-typical coaching book and even a book that gives you an insight in the lives of some agile people.
WTFlop 6M + HU - Beta Bundle
Marionette.js A to Z
Complete Scala Bundle
3 BooksScala is a general-purpose programming language and it's getting extremely popular these days. Some say that learning Scala could be a challenging task. My experience, however, suggests that this is actually a myth that has very little to do with reality. With the right approach, learning Scala can be easy, fun and rewarding.The first book from...
Build A Better Backbone App
3 BooksThe best way to learn new development skills is through experience, but that takes time you don't have.Get the best of both worlds with this bundle: you'll learn how to produce modern web applications by learning from experienced developers like Derick Bailey and David Sulc. BackboneJS is one of the favorite tools on the web today, but it...
People Skills—Soft but Difficult
7 BooksPerhaps you've been told that "lack of people skills" has been holding you back. No wonder: you may have had hundreds of hours of technical training, but little or no "people skills" guidance.You've heard it said that people skills are "soft," whereas technical skills are "hard." For you, though, technical skills are "easy," but people skills...
SurviveJS - Webpack + React
2 BooksGet both SurviveJS - Webpack and SurviveJS - React for a single price!