
Getting Started with Powershell
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- Discover PowerShell commands and cmdlets and understand PowerShell formatting
- Use the PowerShell help system to understand what particular cmdlets do
- Utilise the pipeline to perform typical data manipulation
- Package your code in scripts, functions, and modules
- Solve common problems using basic file input/output functions
- Find system information with WMI and CIM
- Automate IIS functionality and manage it using the WebAdministration module
Who this book is forThis book is intended for Windows administrators or DevOps users who need to use PowerShell to automate tasks. Whether you know nothing about PowerShell or know just enough to get by, this guide will give you what you need to go to take your scripting to the next level.
All prices
More details
Other editions
Additional editions

Content
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 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
- Chapter 2: Building Blocks
- What can you do?
- The scripter's secret weapon - tab completion
- How does that work?
- Interpreting cmdlet syntax
- Summary
- For further reading
- Chapter 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
- Chapter 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 objects returned
- Retrieving the values of a single property
- The Measure-Object cmdlet
- The Group-Object cmdlet
- Putting them together
- Summary
- For further reading
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Chapter 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
- Next Steps
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.