skip to content
Windows PowerShell step by step Preview this item
ClosePreview this item

Windows PowerShell step by step

Author: Ed Wilson
Publisher: Redmond, Washington : Microsoft Press, [2015] ©2015
Edition/Format:   eBook : Document : English : Third editionView all editions and formats

(not yet rated) 0 with reviews - Be the first.

More like this

Find a copy online

Links to this item

Find a copy in the library

&AllPage.SpinnerRetrieving; Finding libraries that hold this item...


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


User-contributed reviews
Retrieving GoodReads reviews...
Retrieving DOGObooks reviews...


Be the first.
Confirm this request

You may have already requested this item. Please select Ok if you would like to proceed with this request anyway.

Linked Data

Primary Entity

<> # Windows PowerShell step by step
    a schema:CreativeWork, schema:Book, schema:MediaObject ;
    library:oclcnum "927112976" ;
    library:placeOfPublication <> ;
    schema:about <> ; # Command languages (Computer science)
    schema:about <> ; # Windows PowerShell (Computer program language)
    schema:about <> ; # Scripting languages (Computer science)
    schema:about <> ;
    schema:about <> ; # Systems programming (Computer science)
    schema:author <> ; # Ed Wilson
    schema:bookEdition "Third edition." ;
    schema:bookFormat schema:EBook ;
    schema:datePublished "2015" ;
    schema:exampleOfWork <> ;
    schema:genre "Electronic books"@en ;
    schema:inLanguage "en" ;
    schema:isSimilarTo <> ;
    schema:name "Windows PowerShell step by step"@en ;
    schema:productID "927112976" ;
    schema:url <> ;
    schema:url <> ;
    schema:url <> ;
    schema:url <> ;
    schema:workExample <> ;
    schema:workExample <> ;
    wdrs:describedby <> ;

Related Entities

<> # Ed Wilson
    a schema:Person ;
    schema:birthDate "1957" ;
    schema:familyName "Wilson" ;
    schema:givenName "Ed" ;
    schema:name "Ed Wilson" ;

<> # Command languages (Computer science)
    a schema:Intangible ;
    schema:name "Command languages (Computer science)"@en ;

<> # Scripting languages (Computer science)
    a schema:Intangible ;
    schema:name "Scripting languages (Computer science)"@en ;

<> # Systems programming (Computer science)
    a schema:Intangible ;
    schema:name "Systems programming (Computer science)"@en ;

<> # Windows PowerShell (Computer program language)
    a schema:Intangible ;
    schema:name "Windows PowerShell (Computer program language)"@en ;

    a schema:CreativeWork ;
    rdfs:label "Windows PowerShell step by step." ;
    schema:description "Print version:" ;
    schema:isSimilarTo <> ; # Windows PowerShell step by step

    a schema:ProductModel ;
    schema:isbn "0735675112" ;
    schema:isbn "9780735675117" ;

    a schema:ProductModel ;
    schema:isbn "1509300430" ;
    schema:isbn "9781509300433" ;

Content-negotiable representations

Close Window

Please sign in to WorldCat 

Don't have an account? You can easily create a free account.