Datasheet
14 CHAPTER 1
•
WHAT IS POWERSHELL, AND WHY DO YOU NEED IT?
PowerShell needs to be installed on any system you want to be able to manage
with PowerShell. PowerShell can be installed on many Microso operating systems
(including XP mode on Windows 7). ere are third-party PowerShell add-ons
for non-Microso operating systems. Knowing what systems you want to manage
allows you to determine which is the best path to deploy PowerShell. Chapter 2
focuses on the proper way to enable and install PowerShell.PowerShell has a robust
and easy-to-use built-in help system that provides descriptions of the various
cmdlets, as well as examples in most cases.
A er PowerShell has been installed, you can learn to read the language. When you
see a command like the following, you should understand what it does:
Get-ADObject –SearchBase “CN=Deleted Objects,i
DC=your domain name,DC=Com” –Filter {lastKnownParent i
-eq “OU=marketing,DC=deploy,dc=com”} -includeDeletedObjectsi
| Restore-ADObject
is command restores deleted users from the marketing organizational unit (OU)
in the
deploy.com
domain.
You can then begin to combine multiple commands into one script. You need to
know how to shorten those commands and unlock many of the other administra-
tive aspects of PowerShell. Working with scripts involves combining the tasks in the
proper order and saving them in one le. ere are websites that have PowerShell
script repositories, and you can leverage the work of another PowerShell adminis-
trator. PowerShell also protects you from rogue PowerShell scripts and allows only
those scripts that are safe and secure
In Chapters 3–5, you will learn to master the basics. You will be able to break the
previous command down into its smallest parts so commands like these do not
scare you away from PowerShell. You will see how easy the language can be used to
perform complex tasks.
What’s in It for IT Professionals?
With Windows Server 2008 R2, you can install many roles and features to provide
functionality to your infrastructure. From Active Directory to Hyper-V to IIS to
Deployment Services, you can perform day-to-day administration with PowerShell.
A er you learn the basics of the language, you need to put PowerShell in practice.
When you install the features on your Windows Server 2008 R2 server, nearly all of
c01.indd 14c01.indd 14 4/18/2011 10:27:19 AM4/18/2011 10:27:19 AM