
This video provides an overview of the entire course.
A proper environment is needed for both testing and learning. A virtual lab provides a quick and versatile solution.
• Discuss physical labs and their limitations
• Discuss virtual labs and their benefits
• Learn that the importance of having a lab environment cannot be overstated
What is a hypervisor, how does virtualization work, and what architecture does Active Directory need?
• Examine the types of hypervisors
• Examine the structure of a virtualized environment
• Discuss the architecture required for an Active Directory lab
Using completely free software we will build a lab environment that can run on Windows, Linux, or a Mac.
• Discover where to get the programs and ISO files required
• Basic setup and walkthrough of VirtualBox
• Build the virtual machines and power them on
Using built-in software with Windows 10 Pro, we will build a lab environment that can be built with and managed by PowerShell.
• Basic setup and walkthrough of Hyper-V
• Use PowerShell to set up our Hyper-V lab
• Power on the virtual machines and connect to them
Using the ISO files we downloaded, we will install the OS versions we need and discuss options.
• Installation options and requirements
• Install the OS versions we need
• Discuss future options
Within the virtual machine servers we have now, we will set up our corporate environment.
• Set up the corporate environment and Active Directory using PowerShell
• Why constant, consistent use of PowerShell is important
• Test our lab connectivity and setup
Access Active Directory with PowerShell.
• Access PowerShell and AD on a Domain Controller
• Access PowerShell and AD on a client computer
• Access PowerShell and AD by PowerShell Remoting to a DC
We will look at accessing and using the help system in PowerShell.
• How to update the help files
• How to access the help system
• Examine the different sections of a help file
How to discover commands.
• Use the help system to search for Active Directory commands
• Use Get-Command to discover Active Directory commands
• Access help to analyze an AD cmdlet we discovered
Analyze how to use commands.
• Analyze a help file to determine proper command usage
• Run a cmdlet to retrieve data
• Put it together to change a user’s email address
How to respond to errors and get familiar with error outputs.
• How to resolve ambiguous parameter names
• How to resolve positional parameter errors
• How to resolve Get-ADUser identity errors
We discuss some of the basic built-in security for PowerShell.
• Built-in safety precautions
• Audit and/or tracking features
• Remote security
We discuss some of the basic built in protections for PowerShell.
• How the default file associations for scripts protects us
• What is the Execution Policy and how does it work?
• How to use -WhatIf and -Confirm
How to access and manage Active Directory Users and Computers.
• Discover commands for AD users and computers
• Create an AD user
• Search for and change properties for AD users
How to access and manage Active Directory Groups.
• Discover commands for AD groups
• Search and create AD groups
• Add and remove members to and from groups
Discover the architecture of Active Directory within PowerShell.
• Examine PSProviders
• Examine PSDrives
• Traverse AD as a filesystem
How to access and modify object properties.
• Obtain and examine object properties
• Narrow the properties returned for an object
• Change an object’s properties
How to select, sort, and use variables.
• Use Select-Object to select specific properties
• Use Sort-Object to change the sorting method used
• Discover and create variables
Optimizing using proper formatting.
• How to measure command speed
• How to most efficiently filter searches
• How to efficiently use the Filter parameter for Get-ADUser
Creating an Active Directory report of users’ emails in CSV format using the pipeline.
• Get all AD users that only have email addresses
• Format to retrieve and sort only the information we want
• Customize properties and output the report to CSV
We will look at discovering commands with advanced techniques.
• How to discover commands from the same source
• Discover what modules are available and load them
• Use Get-Random to get random results
Discover and introduce DNS management within PowerShell.
• Discover both DnsClient and DnsServer modules
• Load the modules by calling cmdlets
• List cmdlets, copy one, paste, and look up using help
Discover and introduce DHCP management within PowerShell.
• Discover DHCP modules and cmdlets
• Get DHCP leases and choose a specific one
• Convert a DHCP lease to a reservation
Create a reusable tool that discovers and reports on obsolete domain computers.
• Decide on a time frame and enter it in a variable
• Gather the computers with the proper filters
• Use the data to create a report and make it a reusable batch file
Create a reusable tool that allows for quick resets of user passwords.
• Create the batch file
• Discover a command to reset passwords
• Fill out the batch file with the proper command string
What are the best ways to create a PowerShell script?
Discover the PowerShell Integrated Scripting Environment
Inserting help and comments
Using full cmdlet and parameter names
Instead of typing out the report from Section 3, let’s make it a script we can run.
Insert the help section and name the script
Lay out the command section
Use third-party tools for scripting
Developing a script to allow team members to properly set up a new user.
Determine the usage
Lay out the help section and name the script
Test the commands in a lab to verify as written
Develop a script to set up a new computer within the domain.
Determine the usage
Lay out the help section and name the script
Test the commands to verify as written
Turn a previous script into a function that can be called like a cmdlet.
Discover the basics of functions
Edit a previous script to create a function
Test the function
Take the function we created and insert it into our PowerShell profile to make it always available.
Discover the PowerShell profile and create if needed
Insert the previous function into our profile
Test the availability of our new function
When team members enter information in a non-uniform fashion, it can harm the integrity of the data. Discover the inaccuracies.
Determine the properties to check
Discover the inaccuracies
Create a quick report to show the inaccuracies
Take the previously discovered inaccuracies and create a workflow to correct them.
Turn the output of the previous discoveries into a variable
Create an if/then statement to target the inaccuracies
Create steps to correct the errors
Create a script that can be run on demand to create a company directory.
Determine the information to display
Build the script to achieve the desired output
Drive the output to the medium desired
Create a script to create a large number of AD users based on a CSV file.
Examine or create a CSV file to pull data from
Develop the script to take the data and use a for each statement
Finalize the script to create the users
Fill in empty AD user properties with another property that does exist.
Determine the property that needs information filled in
Load for that information existing in another property
Put them together to fill in the empty property
PowerShell has become the most efficient tool for managing Microsoft Active Directory. Its ability to solve problems and turn the solution into a new tool or automated task allows the system admin to cut down on future manual labor hours. This course will train you in using PowerShell to manage Active Directory. You will customize your preferences, run custom reports, author scripts, and automate tasks. You will discover how to create scripts, access and change data stores, and automate tasks. By the end of the course, you will have the skills to automate Active Directory jobs with PowerShell components such as cmdlets, functions, modules, providers, objects, variables, expressions, and profiles.
About the Author
Joshua B Jones is an IT Systems Administrator with Airways Freight, leading the global company in PowerShell administration, scripts, and tool creation. A certified Microsoft Professional, he has eliminated thousands of labor hours by automating previously manual tasks using PowerShell. No mere expert, he demonstrates his passion for PowerShell by teaching others all over the World how to use it effectively.