售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Getting Started with PowerShell
Table of Contents
Getting Started with PowerShell
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. First Steps
Determining the installed PowerShell version
Using the registry to find the installed version
Using PowerShell to find the installed version
Installing/upgrading PowerShell
Starting a PowerShell session
PowerShell hosts
64-bit and 32-bit PowerShell
PowerShell as an administrator
Simple PowerShell commands
PowerShell aliases
Summary
For further reading
2. Building Blocks
What can you do?
The scripter's secret weapon – tab completion
How does that work?
Interpreting the cmdlet syntax
Summary
For further reading
3. Objects and PowerShell
Objects all the way down
Digging into objects
Types, classes, and objects
What are members?
The DOS DIR command
The IPCONFIG command
PowerShell for comparison
The Get-Member cmdlet
Where did these all come from?
Summary
For further reading
4. Life on the Assembly Line
The pipeline as an assembly line
This isn't your DOS or Linux pipeline
Objects at your disposal
Dealing with pipeline data
The Sort-Object cmdlet
The Where-Object cmdlet
The Select-Object cmdlet
Limiting the number of objects returned
Limiting the properties of the objects returned
Retrieving the values of a single property
The Measure-Object cmdlet
The Group-Object cmdlet
Putting them together
Summary
For further reading
5. Formatting Output
When does formatting occur?
The rules of automatic formatting
Formatting files
Formatting decisions are based on the first object
Small objects go in a table
Large objects go in a list
Cmdlets that control formatting
Format-Table and Format-List
The dangers of formatting
Best practices of formatting
Summary
For further reading
6. Scripts
Packaging commands
Execution policy
Types of scripts
Scopes and scripts
Parameters add flexibility
Adding some logic
Conditional logic (IF)
Looping logic
More logic
Profiles
Summary
For further reading
7. Functions
Another kind of container
Comparing scripts and functions
Executing and calling functions
Naming conventions
Comment-based help
Parameters revisited
Typed parameters
Switches
Default values for parameters
Output
Summary
For further reading
8. Modules
Packaging functions
Script modules
The Export-ModuleMember cmdlet
Where do modules live?
Removing a module
PowerShell module autoloading
The #Requires statement
Removing a module – take two
Manifest modules
Listing modules
Summary
9. File I/O
Reading and writing text files
Writing text files
Working with CSV files
Output to CSV for quick reports
The Invoke-Item cmdlet
Import from CSV for quick objects
PowerShell streams and redirection
Other types of redirection operators
The out-file cmdlet
CLIXML – a special type of XML
Summary
For further reading
10. WMI and CIM
What is WMI?
WMI organization
Finding WMI classes
Retrieving objects with Get-WMIObject
Getting the right instance
WQL syntax
Calling methods
WMI and CIM
The CIM cmdlets
CDXML modules
Summary
For further reading
11. Web Server Administration
Installing IIS
Detecting and installing IIS in Windows 8.1
Detecting and installing IIS in Server 2012R2
Verifying IIS
The WebAdministration module
Starting, stopping, and restarting IIS
Creating virtual directories and web applications
Working with application pools
Creating application pools
Summary
For further reading
A. Next Steps
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜