Microsoft Exchange Server 2010 Config 70-662

Managing Exchange 2010 with Windows PowerShell

Start your 7-day free trial today.

This video is only available to subscribers.

A free trial includes:

  • Unlimited 24/7 access to our entire IT training video library.
  • Ability to train on the go with our mobile website and iOS/Android apps.
  • Note-taking, bookmarking, speed control, and closed captioning features.

Introduction to Microsoft Exchange and Exchange Certification

Understanding Exchange Roles and Components

Preparing your Infrastructure and Installing your First Exchange Server

Mailbox Server Role: Databases, Mailboxes, and Public Folders

Mailbox Server Role: Addresses, Folders, Groups, Contacts, and Resource Mailboxes

Client Access Server Role: Outlook, OWA, and the Exchange Control Panel

Client Access Server Role: POP & IMAP, ActiveSync, and Outlook Anywhere

Hub Transport Role: Message Transport, Connectors, Accepted Domains, and Remote Domains

Hub Transport Role: Email Address Policies, Transport Rules, and Journal Rules

Edge Transport Role: Installing and Configuring

Edge Transport Role: Message Filtering and Anti-Spam

Understanding and Implementing Federated Sharing

Role-Based Access Control in Exchange Administration

Exchange Backup and Data Recovery

Exchange High Availability: Database Availability Groups

Exchange High Availability: Public Folders and Non-Mailbox Servers

Exchange Monitoring and Reporting

Exchange from the Outside World: Security, Certificates, Name Resolution, and Autodiscovery

Migrating from Previous Exchange Versions to Exchange 2010

Managing Exchange 2010 with Windows PowerShell

00:00:00 - Managing Exchange 2010 with Windows PowerShell.
00:00:05 - You could almost think of this final Nugget
00:00:06 - as being kind of redundant with some of the topics
00:00:09 - that we've talked about throughout this entire series.
00:00:12 - But it's important to take what we've
00:00:14 - learned associated with the management of Exchange 2010
00:00:17 - and really consolidate it into a single item of learning.
00:00:21 - Whether you're taking the test or not,
00:00:23 - when you move to Exchange 2010, you'll
00:00:26 - find that your management techniques, the tactics you
00:00:29 - use to go through your daily management,
00:00:31 - are inevitably going to be forced
00:00:33 - into using Windows PowerShell at the command line.
00:00:36 - Now the reason for this, as we've discussed before,
00:00:39 - is that all of Exchange 2010 really
00:00:41 - functions with Windows PowerShell.
00:00:44 - The Exchange Management Console itself is simply
00:00:46 - a graphical user interface that layers
00:00:49 - on top of Windows PowerShell.
00:00:51 - That being said, whenever you're going through all
00:00:53 - of those management tactics, you can
00:00:55 - be assured that everything you do inside of the Exchange
00:00:58 - Management Console really just runs a PowerShell command
00:01:01 - under the covers.
00:01:03 - And as we also have already learned,
00:01:04 - a number of these commands are simply not
00:01:06 - exposed to the level of the Exchange Management Console.
00:01:09 - So you're going to have to use that console-- or excuse me,
00:01:12 - you're going to have to use the PowerShell to actually do
00:01:15 - some of those commands.
00:01:17 - Now in this Nugget we want to talk about some
00:01:18 - of the interesting things you've got
00:01:20 - to be aware of when you're doing Windows PowerShell,
00:01:22 - and when you're doing management with Windows PowerShell.
00:01:24 - First and foremost is the fact that Exchange PowerShell always
00:01:27 - uses remote connections.
00:01:29 - Even when you're connecting on the same server
00:01:31 - as we've been doing throughout this entire series
00:01:34 - to exchange PowerShell, it's doing so using a technique
00:01:37 - called implicit remoting that effectively brings
00:01:40 - those commands down to the local PowerShell session.
00:01:43 - What's interesting about this is that
00:01:46 - in another computer, another computer outside
00:01:48 - of your environment, you can leverage Windows PowerShell
00:01:51 - on that computer to do the same sorts of Exchange PowerShell
00:01:54 - command type management from that other computer.
00:01:58 - And I'll show you how to do that.
00:01:59 - Inside of the Exchange Management Shell
00:02:01 - is also an element that helps you determine which
00:02:04 - server you want to use for that remote PowerShell.
00:02:07 - In this Nugget, I'll show you where
00:02:08 - you can configure that as well.
00:02:10 - Then I also want to spend a little bit of time
00:02:12 - talking about some of the commandlets of Note.
00:02:14 - If there could be a set of commandlets
00:02:16 - that you probably should be at least familiar with,
00:02:18 - that will be this list of commandlets of Note.
00:02:21 - These are the ones that you will probably
00:02:23 - find yourself using more regularly than others,
00:02:26 - and also ones that-- who knows-- may be tested on you whenever
00:02:29 - you take that exam.
00:02:30 - Also be aware that there are a number
00:02:32 - of PowerShell scripts of Note as well.
00:02:34 - These are installed in the Exchange
00:02:36 - server/V14/Scripts location.
00:02:40 - In this location are a number of PowerShell
00:02:42 - scripts, which are multiple commandlets that run together
00:02:46 - to complete some task.
00:02:48 - And because these scripts are designed by Microsoft,
00:02:50 - you may find that they provide some additional functionality
00:02:53 - over and above what you can build on your own.
00:02:57 - Lastly, I want to talk about the PowerShell command log
00:02:59 - and how you can start logging up PowerShell commands
00:03:02 - as a mechanism to identify what commands are being
00:03:04 - run against your organization.
00:03:07 - But first, let's talk about Exchange PowerShell
00:03:10 - and Exchange PowerShell's use of remote connections.
00:03:13 - We've talked before about how you can use Windows PowerShell
00:03:16 - here in the Exchange Management Shell.
00:03:18 - I can run Get Mailbox, for example, or any of the commands
00:03:21 - and be assured that that command is going to function.
00:03:23 - But what if I don't want to be on the Exchange server?
00:03:26 - What if I don't want to have to RDP to the server
00:03:28 - or walk into the server room to actually accomplish
00:03:31 - these commands?
00:03:32 - I can do so from another desktop.
00:03:34 - For example, this Windows 7 desktop
00:03:37 - that I've logged into as administrator.
00:03:39 - If I want, I can bring forward Windows PowerShell-- Power
00:03:43 - Shell-- and launch it here inside
00:03:46 - of this Windows 7 desktop.
00:03:48 - Now there are a couple of interesting commands
00:03:50 - that you need to be aware of in order to be able to do this,
00:03:52 - and again, this is the technique referred
00:03:54 - to as implicit remoting.
00:03:56 - The first thing we need to do is create a session object.
00:03:59 - So we do $session equals new PS session, configuration name,
00:04:06 -, connection Uri, http, colon, backslash,
00:04:14 - backslash, and then the name of the server that you want
00:04:16 - to connect to, which in our case will be Ex1Nugget.nugget
00:04:18 -, and then authentication Kerberos.
00:04:29 - This actually is going to create that session object.
00:04:31 - Now at this point, we can't actually
00:04:33 - do a Get Mailbox because those commands don't
00:04:36 - exist on this Windows 7 computer.
00:04:38 - The next thing we have to do with the session
00:04:40 - object to be able to use these commands is to actually import
00:04:45 - the session.
00:04:47 - Import dash PSSession, $session.
00:04:51 - This will complete the implicit remoting connection
00:04:54 - and import in that session.
00:04:55 - You'll see here we're creating the implicit remoting module.
00:04:59 - And when we're complete, we'll be
00:05:00 - able to use those commands just like we
00:05:02 - were on that Exchange server.
00:05:04 - You'll notice here we get a warning
00:05:05 - that some of the imported command names
00:05:07 - may include unapproved verbs, which
00:05:08 - might make them less discoverable.
00:05:10 - But if you're aware of what the commands are,
00:05:12 - you can make use of those commands here.
00:05:13 - Let's try Get Mailbox now.
00:05:16 - Check it out.
00:05:17 - We can actually get all the mailboxes off
00:05:19 - of that remote Exchange Server.
00:05:21 - It is through this process of implicit remoting
00:05:23 - that you can, from more or less any PowerShell enabled desktop,
00:05:27 - be able to work with your exchange organization
00:05:31 - without the need for having that Exchange Management console
00:05:33 - lying around.
00:05:34 - This is a great solution if you want
00:05:36 - to make sure that you can have the ability
00:05:38 - to manage your exchange organization from really
00:05:40 - anywhere in your environment.
00:05:43 - So creating this session object is great,
00:05:45 - because within the session object creation language,
00:05:47 - I can identify which of the servers I want to connect to.
00:05:51 - But what if I'm actually on my Exchange Server?
00:05:54 - What if I'm connected into that Exchange server,
00:05:56 - and maybe I want to use PowerShell
00:05:58 - against a different server?
00:05:59 - You'll notice here I'm connected into Exchange 2010,
00:06:02 - the Organizational Health Screen.
00:06:04 - If I right click on this Microsoft Exchange on Premises
00:06:07 - and choose Properties, you'll notice
00:06:08 - that here under the General tab, I
00:06:10 - have an ability to select a server
00:06:12 - to connect to for remote PowerShell.
00:06:14 - I can specify that server, the one that I've
00:06:16 - been to connecting to this entire period,
00:06:18 - or I can connect to the automatically selected server
00:06:20 - if I want.
00:06:21 - This gives you the ability to change
00:06:23 - which server that you're actually connecting
00:06:25 - to to complete those remote PowerShell commands.
00:06:28 - Speaking of those commands, really
00:06:30 - what are the list of commands that you need
00:06:31 - to be aware of when you're taking a look at furthering
00:06:35 - your knowledge associated with Exchange in PowerShell?
00:06:39 - And also in preparing for that exam.
00:06:41 - There are a set of commands that you
00:06:43 - will find that you just use regularly.
00:06:46 - And I've listed a few of these up here
00:06:48 - that you might want to take a look at.
00:06:50 - You'll notice here that I've aligned them
00:06:52 - by the nouns associated with these commands.
00:06:56 - So when it comes to mailboxes, the Get, Set, and Restore verbs
00:07:00 - come in handy for getting those mailboxes,
00:07:02 - setting parameters, and restoring those mailboxes
00:07:04 - whenever you experience a problem.
00:07:07 - Mailbox Statistics, Store Use Statistics, and Mailbox Folder
00:07:10 - Statistics here can also be handy for helping
00:07:12 - you understand some of the mailbox information,
00:07:15 - some of the use of storage, and then also some of the mailbox
00:07:18 - folder information associated with your mailbox server role.
00:07:22 - You can get and set specific Exchange Server configurations
00:07:25 - using the Exchange Server noun.
00:07:27 - Same thing with email address policy for those email
00:07:29 - addresses.
00:07:30 - Or mail and databases and database paths
00:07:32 - here with Get, Set, and Move.
00:07:34 - ADsites and ADsite links can also
00:07:37 - be manipulated and viewed using Get ADsite and Get ADsiteLink.
00:07:41 - Or you can work with your database availability
00:07:43 - groups here using the Get and Set commands as well.
00:07:46 - Sometimes you need to do database copies,
00:07:48 - and you can set mailbox database copies,
00:07:50 - get them, or even update those database
00:07:52 - copies using these commands.
00:07:54 - The address list command you may find that you use quite a bit,
00:07:58 - because you can get, set, and create new address
00:08:00 - lists, again from the command line.
00:08:03 - Same thing goes for mailbox move requests here with the get,
00:08:06 - set, and new move request commandlets.
00:08:08 - And then finally down here is the ability
00:08:10 - to test mail flow, active sync connectivity, OEC connectivity,
00:08:15 - Outlook connectivity, Outlook Web Services, and even edge
00:08:17 - synchronization.
00:08:19 - All of these present a good starting point
00:08:21 - for the list of commandlets that you should keep inside
00:08:23 - of your brain for use whenever you're
00:08:25 - managing your environment.
00:08:27 - Now you may be thinking to yourself,
00:08:28 - this seems like a lot of commands
00:08:30 - that I have to remember.
00:08:31 - It's not like the old DOS days where
00:08:32 - if I knew CD and dir and copy and delete,
00:08:35 - that's really all I needed to know.
00:08:36 - These are a lot of things I have to memorize.
00:08:39 - Well, don't forget that PowerShell includes
00:08:41 - a number of discoverability features
00:08:43 - to help you find what sorts of commandlets
00:08:45 - you might be interested in.
00:08:47 - The Get Command command will help
00:08:50 - you identify all of the different commands that
00:08:52 - are available for you to take a look at.
00:08:54 - Now you'll see the number of those commands
00:08:56 - just scroll through very quickly,
00:08:58 - so you can understand that, well, there's
00:09:00 - a lot of commands that are available.
00:09:02 - But remember that these commands are all the commands that
00:09:05 - are available for you, not withstanding the Exchange
00:09:07 - commands.
00:09:08 - One of the other commands that you
00:09:10 - may want to be aware of to help you discover more
00:09:13 - of these commands that can be useful in managing
00:09:16 - your exchange organization is Get Command
00:09:19 - and then piping that to Where, and then using
00:09:23 - Where objects constraint capability
00:09:25 - to look for where the command name is like, for example,
00:09:30 - let's use "mailbox."
00:09:33 - This will give us a list of the commands which
00:09:35 - include the word "mailbox."
00:09:38 - You'll see here now, I can just look
00:09:39 - at those commands that have to do
00:09:41 - with managing my mailboxes in my exchange organization.
00:09:45 - So never fear those discoverability features
00:09:47 - in with PowerShell.
00:09:48 - PowerShell also provides Get Help
00:09:50 - for any of the commands that are available.
00:09:52 - You can do Get Help, Set Mailbox,
00:09:55 - and discover all of the information
00:09:57 - that you need to know about setting that mailbox.
00:10:01 - This Get Help command sometimes takes a minute or two for it
00:10:04 - to bring up all the help information.
00:10:06 - But again, what this provides is the capability for you
00:10:08 - to understand what the syntax is going
00:10:10 - to be for each of the commands that you're
00:10:12 - going to be using in your environment.
00:10:14 - Now if you're like me, this syntax
00:10:16 - can be somewhat challenging.
00:10:17 - You'll see here there's a significant amount of syntax
00:10:20 - associated with setting mailbox parameters.
00:10:22 - And mainly, a lot of the syntax, at least
00:10:24 - in the case of this command, have
00:10:26 - to do with all the different things, the attributes, that
00:10:28 - are associated with the mailbox.
00:10:30 - One of the things you might also want to do
00:10:32 - is Get Help, Set Mailbox, dash Examples,
00:10:36 - which will provide you a list of common examples associated
00:10:39 - with the use of that command.
00:10:41 - This commandlet with examples really
00:10:43 - can help you spin up your use of Windows PowerShell
00:10:46 - very quickly.
00:10:49 - For those commands that are sometimes
00:10:51 - a little more challenging or more
00:10:52 - difficult to be able to create on your own,
00:10:56 - Microsoft has created a set of PowerShell scripts
00:10:59 - that you should probably be aware of.
00:11:01 - These scripts consolidate a number
00:11:03 - of different commandlets together
00:11:04 - to accomplish some task.
00:11:06 - If you go to the C Program Files, Microsoft,
00:11:09 - Exchange Server, v14, Scripts location,
00:11:13 - you'll see this list of commands that have been created.
00:11:15 - There are a number of them here that we've actually
00:11:18 - worked with before.
00:11:19 - Let's take a look at Install Anti-spam Agents.
00:11:22 - If I double click this command, it brings it up in Notepad,
00:11:25 - and you can see here the structure of this command.
00:11:27 - It's doing some very advanced things,
00:11:29 - such as creating functions and then running them, and running
00:11:32 - if/then statements to actually accomplish some sort of task.
00:11:36 - You may want to be aware of what these commands are
00:11:38 - and generally what they can do, because they
00:11:41 - may be able to help you in certain circumstances.
00:11:44 - Now again, running these commands is important,
00:11:46 - but sometimes it can be difficult
00:11:48 - for you to truly understand what's
00:11:50 - going on whenever you make a change inside of the Exchange
00:11:53 - Management Console and how you can translate that
00:11:56 - into a specific commandlet or a specific set of commandlets
00:12:00 - to actually accomplish something in the Exchange Management
00:12:02 - Shell.
00:12:04 - Let me actually show you a way that you can highlight some
00:12:06 - of the ways that the Exchange Management
00:12:08 - Console and the Exchange Management Shell
00:12:10 - work with each other.
00:12:12 - That is making use of-- up here under the View command--
00:12:15 - viewing the Exchange Management Shell command log.
00:12:18 - You'll see here that it's by default it's empty.
00:12:20 - What you also have to do is click here under Action
00:12:22 - to start command logging.
00:12:24 - What this does is it provides a location for every single thing
00:12:28 - that occurs inside of the Exchange Management Console
00:12:31 - to be logged by command here inside of the log.
00:12:34 - Let's take a look here.
00:12:35 - Maybe we'll flip through and take a look at a mailbox.
00:12:38 - If we click here on Mailbox, we're
00:12:40 - going to enumerate some information here
00:12:41 - in order to get that mailbox.
00:12:43 - This will probably show up here as a set of commands
00:12:46 - in the Exchange Management Shell command log.
00:12:49 - In order for us to simply click on this one link
00:12:51 - inside of the Exchange Management Console,
00:12:53 - we need to run four commands-- Get Mailbox Database, Public
00:12:56 - Folder Database, and then two more commandlets here
00:12:59 - associated with Mailbox Database and Mailbox Database Copy
00:13:02 - Status.
00:13:03 - Clicking on any of these links up here on the top
00:13:05 - brings out more information here on the bottom associated
00:13:08 - with what that commandlet did.
00:13:11 - This little tool provides an excellent way for you
00:13:13 - to log how people are making use of the Exchange Management
00:13:16 - Console, and also to help you translate the things
00:13:19 - that you're doing inside of the console with the things
00:13:22 - you can be doing inside of the shell.
00:13:24 - So what have we talked about this, now
00:13:25 - that we've really talked about all of the different pieces
00:13:28 - that you need to be aware of associated with managing
00:13:30 - Exchange 2010 with Windows PowerShell.
00:13:34 - We talked about how Exchange PowerShell always uses
00:13:36 - those remote connections, whether you're on the Exchange
00:13:39 - server or if you're somewhere else in your environment
00:13:41 - using the tactic called Implicit Remoting.
00:13:43 - We talked about how you can select
00:13:45 - a server for remote PowerShell.
00:13:46 - We also talked about some of those PowerShell commandlets
00:13:49 - of note and PowerShell scripts of note
00:13:50 - that you should be aware of.
00:13:52 - And finally, we concluded with a look
00:13:54 - at the PowerShell command log, a useful tool
00:13:57 - for helping you translate between what
00:13:59 - you see in the Exchange Management Console
00:14:01 - and then what you can do in the Exchange Management Shell.
00:14:04 - This really brings us to the conclusion of this series.
00:14:07 - This entire 20 series, as we said in the beginning,
00:14:09 - is designed to help you understand
00:14:11 - what you need to know to be successful with Microsoft
00:14:14 - Exchange.
00:14:15 - Planning it, implementing it, configuring it, rolling it out,
00:14:18 - and then ultimately managing it and maintaining it over time.
00:14:22 - We've spent time talking about installing your first Exchange
00:14:25 - Server.
00:14:25 - We talked about the mailbox server role and the client
00:14:28 - access server role.
00:14:29 - We moved into the hub transport and edge transport role,
00:14:31 - and then concluded with some of these management topics that
00:14:35 - will help you again be successful with working
00:14:37 - with that Exchange organization once it's up and running.
00:14:41 - Once again, my name is Greg Shields,
00:14:42 - and it's been a real pleasure working
00:14:44 - with you over this entire series of Nuggets
00:14:46 - to help enlighten and educate you
00:14:48 - on what you need to know to pass that exam 70-662,
00:14:52 - and also how to be successful with your own Exchange Server
00:14:55 - 2010 organization.
00:14:57 - I hope this has been informative for you,
00:14:59 - and I'd like to thank you for viewing.

Please help us improve by sharing your feedback on training courses and videos. For customer service questions, please contact our support team. The views expressed in comments reflect those of the author and not of CBT Nuggets. We reserve the right to remove comments that do not adhere to our community standards.

comments powered by Disqus

Course Features

Speed Control

Play videos at a faster or slower pace.


Pick up where you left off watching a video.


Jot down information to refer back to at a later time.

Closed Captions

Follow what the trainers are saying with ease.

Premium Features

Transcender® Practice Exams

These practice tests help you review your knowledge and prepare you for exams.

Offline Training

Our mobile apps offer the ability to download videos and train anytime, anywhere offline.

Accountability Coaching

Develop and maintain a study plan with assistance from coaches.

Stay Connected

Get the latest updates on the subjects you choose.

  © 2015 CBT Nuggets. All rights reserved. Licensing Agreement | Billing Agreement | Privacy Policy | RSS