Windows PowerShell Step by Step
Home > Computing and Information Technology > Operating systems > Microsoft (Windows) operating systems > Windows PowerShell Step by Step
Windows PowerShell Step by Step

Windows PowerShell Step by Step

|
     0     
5
4
3
2
1




Out of Stock


Notify me when this book is in stock
About the Book

Your hands-on guide to Windows PowerShell scripting fundamentals Expand your expertise--and teach yourself the fundamentals of Windows PowerShell scripting, including features available in Windows PowerShell 5. If you are an IT professional, power user, or consultant, you’ll get the guidance, exercises, and code you need to master core techniques for automating Windows setup, deployment, and management.   Discover how to: Run cmdlets and command-line utilities Administer Windows-based servers and desktops with built-in cmdlets Use providers to access external information Write and run scripts from the Windows ISE Create functions that are easy to maintain Build standardized environments with profiles Automate Windows systems with WMI, CIM cmdlets, and remoting Automate Active Directory Domain Services (AD DS) Debug scripts and handle errors Run commands that survive interruptions Use Desired State Configuration (DSC) to manage software services and their environments Get powerful new modules from PowerShell Gallery   About You This book is for: IT professionals and power users who want to get productive with Windows PowerShell, including new features in Windows PowerShell 5 Windows system administrators who want to be more efficient and productive Anyone pursuing Windows PowerShell certifications No experience with Windows PowerShell or other scripting technologies necessary

Table of Contents:
Introduction    xix Chapter 1: Overview of Windows PowerShell 5.0    1 Understanding Windows PowerShell    1 Using cmdlets    3 Installing Windows PowerShell    3 Deploying Windows PowerShell to down-level operating systems    3 Using command-line utilities    4 Security issues with Windows PowerShell    6 Controlling execution of Windows PowerShell cmdlets    6 Confirming actions    7 Suspending confirmation of cmdlets    8 Working with Windows PowerShell    10 Accessing Windows PowerShell    10 Configuring the Windows PowerShell console    11 Supplying options for cmdlets    11 Working with the help options    12 Exploring commands: Step-by-step exercises    19 Chapter 1 quick reference    22 Chapter 2: Using Windows PowerShell cmdlets    23 Understanding the basics of cmdlets    23 Using the Get-ChildItem cmdlet    24 Obtaining a directory listing    24 Formatting a directory listing by using the Format-List cmdlet    26 Using the Format-Wide cmdlet    27 Formatting a directory listing by using Format-Table    29 Formatting output with Out-GridView    31 Taking advantage of the power of Get-Command    36 Searching for cmdlets by using wildcard characters     36 Using the Get-Member cmdlet    44 Using the Get-Member cmdlet to examine properties and methods    45 Using the New-Object cmdlet    50 Creating and using the wshShell object    50 Using the Show-Command cmdlet    52 Windows PowerShell cmdlet naming helps you learn    54 Windows PowerShell verb grouping    55 Windows PowerShell verb distribution     55 Creating a Windows PowerShell profile    57 Working with cmdlets: Step-by-step exercises    59 Chapter 2 quick reference    63 Chapter 3: Understanding and using Windows PowerShell providers    65 Understanding Windows PowerShell providers    65 Understanding the alias provider    66 Understanding the certificate provider    69 Understanding the environment provider    76 Understanding the filesystem provider    80 Understanding the function provider    85 Using the registry provider to manage the Windows registry    87 The two registry drives    88 The short way to create a new registry key    95 Dealing with a missing registry property    98 Understanding the variable provider    99 Exploring Windows PowerShell providers: Step-by-step exercises    103 Chapter 3 quick reference    107 Chapter 4: Using Windows PowerShell remoting and jobs    109 Understanding Windows PowerShell remoting    109 Classic remoting    109 WinRM     114 Using Windows PowerShell jobs    122 Using Windows PowerShell remoting and jobs: Step-by-step exercises    132 Chapter 4 quick reference    135 Chapter 5: Using Windows PowerShell scripts    137 Why write Windows PowerShell scripts?    137 The fundamentals of scripting    139 Running Windows PowerShell scripts    139 Turning on Windows PowerShell scripting support    140 Transitioning from command line to script    143 Manually running Windows PowerShell scripts    145 Understanding variables and constants    148 Using the While statement    154 Constructing the While statement in Windows PowerShell    154 A practical example of using the While statement    156 Using special features of Windows PowerShell    157 Using the Do...While statement    157 Using the range operator    158 Operating over an array    158 Casting to ASCII values    159 Using the Do...Until statement    160 Comparing the Windows PowerShell Do...Until statement with VBScript    160 Using the Windows PowerShell Do statement    161 The For statement    162 Using the For statement     163 Using the Foreach statement    164 Exiting the Foreach statement early    166 Using the If statement    168 Using assignment and comparison operators    169 Evaluating multiple conditions    170 The Switch statement    171 Using the Switch statement    172 Controlling matching behavior    174 Creating multiple folders: Step-by-step exercises    174 Chapter 5 quick reference    177 Chapter 6: Working with functions    179 Understanding functions    179 Using functions to provide ease of code reuse    186 Including functions in the Windows PowerShell environment    188 Using dot-sourcing    188 Using dot-sourced functions    190 Adding help for functions    191 Using a here-string object for help    192 Using two input parameters    194 Using a type constraint in a function    198 Using more than two input parameters    200 Using functions to encapsulate business logic    202 Using functions to provide ease of modification    204 Understanding filters    209 Creating a function: Step-by-step exercises    213 Chapter 6 quick reference    216 Chapter 7: Creating advanced functions and modules    217 The [cmdletbinding] attribute    217 Easy verbose messages    218 Automatic parameter checks    219 Adding support for the -WhatIf switch parameter    222 Adding support for the -Confirm switch parameter    223 Specifying the default parameter set    224 The Parameter attribute    224 The Mandatory parameter property    225 The Position parameter property    226 The ParameterSetName parameter property    227 The ValueFromPipeline property    228 The HelpMessage property    229 Understanding modules    230 Locating and loading modules    230 Installing modules    235 Creating a module    246 Creating an advanced function and installing a module: Step-by-step exercises    253 Chapter 7 quick reference    257 Chapter 8: Using the Windows PowerShell ISE    259 Running the Windows PowerShell ISE    259 Navigating the Windows PowerShell ISE    260 Working with the script pane    263 Using tab expansion and IntelliSense    264 Working with Windows PowerShell ISE snippets    266 Using Windows PowerShell ISE snippets to create code    266 Creating new Windows PowerShell ISE snippets    268 Removing user-defined Windows PowerShell ISE snippets    269 Using the Commands add-on and snippets: Step-by-step exercises    270 Chapter 8 quick reference    274 Chapter 9: Working with Windows PowerShell profiles    275 Six different Windows PowerShell profiles    275 Understanding the six Windows PowerShell profiles    276 Examining the $profile variable    276 Determining whether a specific profile exists    278 Creating a new profile    279 Design considerations for profiles    279 Using one or more profiles    281 Using the All Users, All Hosts profile    283 Using your own file    284 Grouping similar functionality into a module    285 Where to store the profile module    285 Creating and adding functionality to a profile: Step-by-step exercises    286 Chapter 9 quick reference    289 Chapter 10: Using WMI    291 Understanding the WMI model    292 Working with objects and namespaces    292 Listing WMI providers    297 Working with WMI classes    298 Querying WMI    301 Obtaining service information: Step-by-step exercises    306 Chapter 10 quick reference    312 Chapter 11: Querying WMI    313 Alternate ways to connect to WMI    313 Returning selective data from all instances    321 Selecting multiple properties    322 Choosing specific instances    325 Using an operator    327 Shortening the syntax    330 Working with software: Step-by-step exercises    332 Chapter 11 quick reference     339 Chapter 12: Remoting WMI    341 Using WMI against remote systems    341 Supplying alternate credentials for the remote connection    342 Using Windows PowerShell remoting to run WMI    345 Using CIM classes to query WMI classes    346 Working with remote results    348 Reducing data via Windows PowerShell parameters    352 Reducing data via WQL query    353 Running WMI jobs    355 Using Windows PowerShell remoting and WMI: Step-by-step exercises    357 Chapter 12 quick reference     360 Chapter 13: Calling WMI methods on WMI classes    361 Using WMI cmdlets to execute instance methods    361 Using the Terminate method directly    363 Using the Invoke-WmiMethod cmdlet    365 Using the [wmi] type accelerator    366 Using WMI cmdlets to work with static methods    367 Executing instance methods: Step-by-step exercises    370 Chapter 13 quick reference     373 Chapter 14: Using the CIM cmdlets    375 Using the CIM cmdlets to explore WMI classes    375 Using the Get-CimClass cmdlet and the -ClassName parameter    375 Finding WMI class methods    377 Filtering classes by qualifier    379 Retrieving WMI instances    383 Reducing returned properties and instances    383 Cleaning up output from the command    384 Working with associations    385 Retrieving WMI instances: Step-by-step exercises    392 Chapter 14 quick reference     394 Chapter 15: Working with Active Directory    395 Creating objects in Active Directory    395 Creating an OU    395 ADSI providers    397 LDAP names    399 Creating users    405 What is user account control?    408 Working with users    409 Creating multiple OUs: Step-by-step exercises    423 Chapter 15 quick reference    429 Chapter 16: Working with the AD DS module    431 Understanding the Active Directory module    431 Installing the Active Directory module    431 Getting started with the Active Directory module    433 Using the Active Directory module    433 Finding the FSMO role holders    435 Discovering Active Directory    439 Renaming Active Directory sites    442 Managing users    443 Creating a user    446 Finding and unlocking Active Directory user accounts    447 Finding disabled users    449 Finding unused user accounts    451 Updating Active Directory objects: Step-by-step exercises    454 Chapter 16 quick reference    457 Chapter 17: Deploying Active Directory by using Windows PowerShell    459 Using the Active Directory module to deploy a new forest    459 Adding a new domain controller to an existing domain    465 Adding a read-only domain controller    468 Installing domain controller prerequisites and adding to a forest: Step-by-step exercises    470 Chapter 17 quick reference    472 Chapter 18: Debugging scripts    473 Understanding debugging in Windows PowerShell    473 Understanding the three different types of errors    473 Using the Set-PSDebug cmdlet     479 Tracing the script    479 Stepping through the script    483 Enabling strict mode    488 Debugging the script    492 Setting breakpoints    492 Setting a breakpoint on a line number    492 Setting a breakpoint on a variable    495 Setting a breakpoint on a command    499 Responding to breakpoints    501 Listing breakpoints    503 Enabling and disabling breakpoints    504 Deleting breakpoints    504 Debugging a function: Step-by-step exercises    505 Chapter 18 quick reference    509 Chapter 19: Handling errors    511 Handling missing parameters    511 Creating a default value for a parameter    512 Making the parameter mandatory    513 Limiting choices    514 Using PromptForChoice to limit selections    514 Using Test-Connection to identify computer connectivity    516 Using the -contains operator to examine the contents of an array    517 Using the -contains operator to test for properties    519 Handling missing rights     521 Using an attempt-and-fail approach    522 Checking for rights and exiting gracefully    522 Handling missing WMI providers    523 Handling incorrect data types    532 Handling out-of-bounds errors    536 Using a boundary-checking function    536 Placing limits on the parameter    537 Using Try...Catch...Finally    538 Catching multiple errors    541 Using PromptForChoice to limit selections and using Try…Catch…Finally: Step-by-step exercises    544 Chapter 19 quick reference     546 Chapter 20: Using the Windows PowerShell workflow    547 Why use workflows?    547 Workflow requirements    548 A simple workflow    548 Parallel PowerShell    549 Workflow activities    552 Windows PowerShell cmdlets as activities    553 Disallowed core cmdlets    554 Non-automatic cmdlet activities    554 Parallel activities    555 Checkpointing Windows PowerShell workflow    556 Understanding checkpoints    556 Placing checkpoints    556 Adding checkpoints    556 Adding a sequence activity to a workflow    559 Creating a workflow and adding checkpoints: Step-by-step exercises    561 Chapter 20 quick reference    563 Chapter 21: Managing Windows PowerShell DSC    565 Understanding Desired State Configuration    565 The DSC process    566 Configuration parameters    568 Setting dependencies    570 Controlling configuration drift    571 Modifying environment variables    573 Creating a DSC configuration and adding a dependency: Step-by-step exercises    576 Chapter 21 quick reference    580 Chapter 22: Using the PowerShell Gallery    581 Exploring the PowerShell Gallery    581 Configuring and using PowerShell Get    583 Installing a module from the PowerShell Gallery    585 Configuring trusted installation locations    586 Uninstalling a module     586 Searching for and installing modules from the PowerShell Gallery: Step-by-step exercises    587 Chapter 22 quick reference    589 Appendix A: Windows PowerShell scripting best practices    591 Appendix B: Regular expressions quick reference    599 Index    603 About the author    631


Best Sellers


Product Details
  • ISBN-13: 9781509300457
  • Publisher: Microsoft Press,U.S.
  • Binding: Digital download
  • No of Pages: 704
  • ISBN-10: 1509300457
  • Publisher Date: 01 Oct 2015
  • Language: English
  • Weight: 1 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Windows PowerShell Step by Step
Microsoft Press,U.S. -
Windows PowerShell Step by Step
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Windows PowerShell Step by Step

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!