Video: What is PowerShell and how can it make your IT staff more efficient?
Video: What is PowerShell and how can it make your IT staff more efficient?
I want to introduce a new management tool from Microsoft for your IT department, called PowerShell.
PowerShell is a real-time, interactive management tool that lets IT Administrators and System Engineers do bulk administrative tasks and automation events in a highly efficient manner.
The early adopters of PowerShell were primarily developers who pushed the scripting language portion of PowerShell to its limits. So, when you Google PowerShell, you’ll see a lot of returns regarding scripts.
But PowerShell is not a scripting language. Actually, PowerShell is a command-line tool, similar to the “shell” that you would see in languages like UNIX or Linux. What this command-line tool does is allow IT departments to work faster.
While the graphical tools that we use in IT are useful, they only allow us to manage one action at a time. The challenge is that mid-size and larger companies and organizations don’t want to manage one action at a time. They need to manage hundreds or thousands of things at once, whether they’re users, servers or configuration settings.
For example, the IT Admin often needs to go into Active Directory to change a user’s department name. To do this, we can start up a graphical utility, such as Active Directory Users and Computers.
In this utility, our users are organized in something called “Organizational Units.” In this example, the one called “Sales” is where all of the sales people are located, and you can see them all listed here.
For this example we need to change the status of a sales person named Alice Stanley. She’s moving from “Sales” to a new department called “Customer Service.” We can double-click “Alice.”
Then find the tab that contains “Department name,” which is under “Organization.”
Then select “Department” and change this to “Customer Service” and hit “OK.”
I know that didn’t look like a big deal, and it really isn’t. But here’s a common business challenge. We don’t need to change one person in “Sales” to “Customer Service,” we need to change thousands of them to “Customer Service.”
It’s doubtful that an IT Manager would want to pay administrators to use graphical interface to change each contact status individually, it could take days to accomplish this. Fortunately, there is a much more efficient way, and that is to accomplish this challenge using PowerShell.
Instead of using the graphical interface, we’ll launch PowerShell.
If you’ve ever seen a command-line tool before, it looks like any other command line.
What’s different about PowerShell is that we can include commands for a variety of products. In this example, we’ll add the commands for Active Directory.
Note – all Microsoft products will support PowerShell commands. In other words, every Microsoft product that you work with is starting to come with a set of commands specific to managing that product. Once IT professionals learn PowerShell, they can use any of these commands for any products to do bulk administrative tasks.
Now that we have the Active Directory cmdlets, let’s use a particular Active Directory command in PowerShell called “Get AD user.”
As you might surmise, this would grab all users. So, let’s use a filter that uses a location of OU, or “Organizational Unit,” of Sales.
It may look like strange syntax, but we’re not worried about the syntax. Next, let’s specify the location. Then we want to be able to have access to all of their properties.
At this point, we could stop and see if it will give a list of the right users. As a matter of fact, let’s find out by striking “enter,” and you’ll see that result is scrolling a list of users.
We can quickly check whether these are the users that we’re looking for in the right location, and they are.
We have the correct users, so now let’s change their department to “Customer Service.” Here’s one of the beautiful things about PowerShell. Once we find what we’re looking for, all that needs to be done is something called a “pipe,” the character ( | ), and we can then change whatever information we’d like.
Let’s set AD user and change their department. Note that it can scroll around the screen without affecting the outcome. Now we’ll change the department to “Customer Service”
With PowerShell, no news is good news. The prompt comes back with no error messages.
Let’s see what PowerShell did. To verify that it worked, we’ll run a cmdlet that will allow us to choose the name of the user and their department so we can see the results.
Now all of the users from “Sales” are now in the “Customer Service” department.
What took only a few seconds with PowerShell would take a regular IT Admin days or sometimes weeks to accomplish using the graphical interface when trying to do bulk administration.
Another benefit of PowerShell is its scripting language, which allows the easy repetition of what we call “one liners” to be executed over and over again. These can be automated with PowerShell. You can even make your own set of command tools, known as “cmdlets” for other administrators.
Here’s a quick example. With PowerShell, we’ll take the “one liners” that we’ve created earlier and put them into a scripting language. In addition, working with PowerShell, it’s possible to put a little bit of structure around these one-liners. This creates powerful automation for disaster recovery or even if you want to create new commands for other administrators.
For example, after creating a couple of new commands, we can import them just like we do with Active Directory or any other Microsoft product. In this example, I’ll import my own set of commands.
Now that I have them, I can easily use them and share them with other administrators so that they can run them as well.
This is the central benefit of PowerShell, allowing a group of people to quickly and efficiently manage administration throughout a network. PowerShell allows IT professionals to automate processes, automate disaster recovery and automate system configurations and deployment. In addition, we can even create tools for other Admins to also be more efficient. PowerShell gives the Admin a flexibility that the graphical just doesn’t have. If you have to do something more than once, you might as well automate it. PowerShell can do that job.
You May Also Like
In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management
This is part 1 of our 5-part Office 365 free training course. In this Office 365 training video, instructor Spike Xavier introduces some of the most popular services found in Microsoft Office 365 including the Admin Portal and Admin Center. For instructor-led Office 365 training classes, see our course schedule: Spike Xavier SharePoint Instructor – … Continue reading An Overview of Office 365 – Administration Portal and Admin Center
In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365. For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365