0%

0/1 Lessons

Course Introduction

• 5min

0 / 2 lessons complete

Getting Started with Windows PowerShell

• 56min

0 / 8 lessons complete

Getting Help and Finding Commands

• 39min

0 / 6 lessons complete

PowerShell Command Syntax

• 33min

0 / 5 lessons complete

PowerShell Objects and Properties

• 35min

0 / 6 lessons complete

The PowerShell Pipeline

• 24min

0 / 2 lessons complete

PowerShell Providers

• 30min

0 / 5 lessons complete

PowerShell Arrays and Variables

• 28min

0 / 4 lessons complete

PowerShell Loops

• 19min

0 / 3 lessons complete

PowerShell Conditional Statements

• 11min

0 / 1 lessons complete

On Premises Lab Setup

• 36min

0 / 8 lessons complete

Basic Domain Administration with Windows PowerShell

• 2hr 27min

0 / 10 lessons complete

Send Emails with PowerShell

• 22min

0 / 2 lessons complete

PowerShell Desired State Configuration (DSC) Basics

• 1hr 48min

0 / 6 lessons complete

PowerShell Modules

• 58min

0 / 7 lessons complete

Powershell Challenges

• 1hr 55min

0 / 23 lessons complete

Section Overview
Full Access Account Required

Video | 5 min

The Trusted Hosts List Challenge
Full Access Account Required

Text | 5 min

The Trusted Hosts List Answer
Full Access Account Required

Video | 5 min

Starting a Remote Session Challenge
Full Access Account Required

Text | 5 min

Starting a Remote Session Answer
Full Access Account Required

Video | 5 min

Rename a Computer Challenge
Full Access Account Required

Text | 5 min

Rename a Computer Answer
Full Access Account Required

Video | 5 min

Change a Password on a Remote Computer Challenge
Full Access Account Required

Text | 5 min

Change a Password on a Remote Computer Answer
Full Access Account Required

Video | 5 min

How to Copy Files To-From a Remote Machine Challenge
Full Access Account Required

Text | 5 min

How to Copy Files To-From a Remote Machine using VSC Answer
Full Access Account Required

Video | 5 min

How to Export Logs to a CSV File Challenge
Full Access Account Required

Text | 5 min

How to Export Logs to a CSV File Answer
Full Access Account Required

Video | 5 min

How to Create Multiple Folders on the Host Machine using Powershell
Full Access Account Required

Text | 5 min

How to Create Multiple Folders on the Host Machine using Powershell Answer
Full Access Account Required

Video | 5 min

Who Rebooted the Server ID1074 Challenge
Full Access Account Required

Text | 5 min

Who Rebooted the Server
Full Access Account Required

Video | 5 min

How can you get Info on all your Hard Drives Challenge
Full Access Account Required

Text | 5 min

How can you get Info on all your Hard Drives Answer
Full Access Account Required

Video | 5 min

How can I get a list of CPU's and Installed Printers, Last Boot-up Time Challenge
Full Access Account Required

Text | 5 min

How can I get a List of CPU's and Installed Printers, Last Boot-up Time Answer
Full Access Account Required

Video | 5 min

How can I Automate Tasks with Task Scheduler Challenge
Full Access Account Required

Text | 5 min

How can I Automate Tasks with the Task Scheduler Answer
Full Access Account Required

Video | 5 min

Course Conclusion

• 1min

0 / 1 lessons complete

Configuring PowerShell Execution Policy with Group Policy

Instructions

Q&A (0)

Notes (0)

Resources (0)

Saving Progress...

Resources

There are no resources for this lesson.

Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.

Create note

In this lecture, we are going to configure our Script Execution with Group Policy.

Now, first I want to talk about what are Script Execution Policies? Also known as Execution Policies.

These are policies that are designed to assist users. So, users assign basic rules, and the Execution Policies are designed to prevent users from unintentionally violating those rules.

So, Script Execution contrary to what you might think is NOT a security system, and it can be easily bypassed.

So, with that being said I am going to hop to my server IPDC01, and I am going to show you how to configure a Group Policy Object so that we can execute scripts.

What I am going to do is open the PowerShell ISE by clicking on the lower-hand side of the screen, and I am going to type powershell. Next, I am going to select the Windows PowerShell ISE.

Here I am going to type a simple command like:

     echo “Test”

And, I am going to click the Run button up here. We can see that it successfully completes the script.

And, You’ll notice there’s a * next to the name in the tab Untitled1.ps1*. This means we have unsaved changes. So what I am going to do is save the script by clicking File > Save.

And, I will just save it to my Desktop and will leave it named Untitled1 and click Save.

So, now we have our script saved. If I click the Play button, now we are going to get an error.

And, it is saying, it cannot be loaded because running scripts is disabled on this system.

One thing to keep in mind is that you can write out your scripts here as much as you want, but the second that you save them, or if you are working with a file, the script is going to fail. So, this is not designed to prevent you from writing a set of instructions and executing them, it is just to keep you from running scripts that you don’t want to run.

So, here in PowerShell at the bottom, if we type Get-ExecutionPolicy -List we can get a list of all the execution policies that are on this machine.

So, here we can see all Undefined. If something is undefined it defaults to the value of Restricted.

So, what this is telling me is that I don’t have any kind of Group Policy object telling my computer whether it should or it should not allow you to execute scripts, so therefore my computer is defaulting to not allowing me to run scripts.

Now, if you see some settings inside of this list you can check to see if it's Group Policy, and I’ll cover that in a second.

So, let’s go ahead and create a Group Policy Object and let’s allow our Machine and UserPolicy Unrestricted access to run these scripts.

So, I am going to switch over to Server Manager and I am going to click on Tools on the upper right-hand corner of the screen and I am going to choose Group Policy Management.

Here I have my domain instructorpaul.com expanded and I have my Organizational Units here. What I am going to do is I am going to create a GPO, and the placement of this GPO is very important because we are going to be configuring a Computer Setting. So, it needs to be linked to something that has Computers inside of the OU or it has the target computers.

So, if I want to allow script execution only on my Domain Controllers I would create the GPO under the Domain Controllers Organizational Unit. If I had an OU under instructorpaul.com like Domain Workstations I could create the GPO here and it would only allow script execution on my Domain Workstations.

Server Academy Members Only

Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.

0 0 votes
Lesson Rating
Subscribe
Notify of
profile avatar
0 Comments
Inline Feedbacks
View all comments