Читать книгу Group Policy - Jeremy Moskowitz - Страница 19

Chapter 2
Managing Group Policy with the GPMC and via PowerShell

Оглавление

In Chapter 1, “Group Policy Essentials,” you got to know how and when Group Policy works. We used Active Directory Users and Computers to create and manage users and computers, but we used the Group Policy Management Console (GPMC) to manage Group Policy. We got a little workout with the GPMC when creating new GPOs and linking them to various levels in Active Directory.

And, for just a moment, we went back to the old-school way to delegate control to Frank and the HR-OU-Admins group to link existing GPOs to their Human Resources OU structure.

In this chapter, I’ll cover the remainder of the daily tasks you can perform using the GPMC. As a reminder, the GPMC is for all implementations of Active Directory. That is, you can use the GPMC to manage your Active Directory – whatever the Domain Controllers are that constitute it.

You just need the GPMC loaded up on some machine. Now, in the previous chapter, I put a pretty fine point on it: you want this machine to be one of the latest machines possible, either a Windows 10 or a Windows Server 2016 machine. There are some older editions, but I don’t recommend you use them.

For this edition of the book, I’ve decided to also show the PowerShell equivalent of the GPMC process. In other words, for almost all the things you can do in the GPMC, you could, if you wanted, use PowerShell.

But first, let’s answer the question, Why would you want to do the items within the GPMC using PowerShell? Said another way, if the clickety-clicks are straightforward and easy, why would you want to make it harder on yourself and typety-type your way through the same process?

The answer to that would be if you need to do anything that’s repeatable process. For instance, in this chapter, you’re going to learn how to do things like this:

● Create a Group Policy Object and give it a name.

● Link a Group Policy Object to an OU.

● Order Group Policy Objects at a level, say, the OU level.

Yep, I’m definitely going to show you how to clickety-click your way to success here. But I’m also going to show you the typety-type way using PowerShell. So if you needed to do the same thing over and over again, you could recycle the typety-types and make it a repeatable script.

If you wanted to fully ignore all the PowerShell text, and focus just on the GPMC clickety-clicks, you could do that.

Also, that being said, I’m not going to be going deep into PowerShell, syntax rules, or actually making scripts. There are zillions of PowerShell tutorials and books that talk about how to do that. And, one of the appendices, entitled “Scripting Group Policy Operations with Windows PowerShell,” has a mini-section right at the top entitled “Preparing for Your PowerShell Experience.” There you’ll learn what I think are the three most important pieces of getting started with PowerShell:

● Getting PowerShell up and running

● Downloading the latest help from Microsoft

● Setting up to run actual scripts (which shouldn’t be needed for the one-liners in this chapter)

So, here’s my recommendation for using this chapter:

1. Read this chapter, and do the clickety-clicks.

2. If you’re already reasonably PowerShell savvy, then just go for the PowerShell examples in this chapter if you want to try them out.

3. If you’re warming up to PowerShell, jump to the appendix entitled “Scripting Group Policy Operations with Windows PowerShell” and read the section “Preparing for Your PowerShell Experience,” get set up, then come back to this chapter as a reference for most of what can be done with Group Policy and PowerShell.

Again, you should have already created your management station with the GPMC in the previous chapter. Remember, if you don’t use a Windows 10 machine (or Windows Server 2016) as your management station, you won’t have access to all the latest awesome powers in the Group Policy arsenal. In this chapter, you’re going to be working again with your WIN10MANAGEMENT machine where you’ve already loaded the updated GPMC.

With that in mind, let’s get to know the GPMC a bit better.


I’m going to assume you’ve already installed the GPMC on either your Windows 10 management station (WIN10MANAGEMENT) or your Windows Server 2016 Domain Controller (DC01). If you haven’t tackled those installation steps, go back to Chapter 1 and find the section “Implementing the GPMC on Your Management Station.”

Once you’re ready to get started, from the Start screen, type GPMC.MSC.

Group Policy

Подняться наверх