Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Microsoft

Create and modify scripts by using Windows PowerShell

Microsoft via Microsoft Learn

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
  • This module explains how to create and run scripts.

    Upon completion of this module, the learner will be able to:

    • Describe Windows PowerShell scripts.

    • Explain how to find scripts and modify them.

    • Describe how to create scripts.

    • Describe the PowerShellGet module.

    • Explain how to run Windows PowerShell scripts.

    • Describe the script execution policy.

    • Set the script execution policy.

    • Explain how to use AppLocker to help secure Windows PowerShell scripts.

    • Explain how to digitally sign scripts.

    • Digitally sign a Windows PowerShell script.

  • This module explains how to use scripting constructs for iteration and decision making in Windows PowerShell.

    Upon completion of this module, the learner will be able to:

    • Describe the syntax of the ForEach construct.

    • Use the ForEach construct.

    • Describe the syntax of the If construct.

    • Use the **If **construct.

    • Describe the syntax of the Switch construct.

    • Use the Switch construct.

    • Describe how to use the For construct.

    • Describe the other loop constructs.

    • Explain how to use Break and Continue.

  • This module explains how to import data from a text file, CSV file, XML file, and JavaScript Object Notation (JSON) file.

    Upon completion of this module, the learner will be able to:

    • Describe how to use Get-Content to review file data.
    • Describe how to use Import-Csv to retrieve data.
    • Describe how to use Import-Clixml to import XML data.
    • Describe how to use ConvertFrom-Json to work with JSON data.
    • Import data from text, CSV, and XML files.
  • This method explains multiple methods for accepting user input in a Windows PowerShell script.

    Upon completion of this module, the learner will be able to:

    • Identify values in a script that are likely to change.

    • Explain how to use Read-Host to accept user input.

    • Explain how to use Get-Credential to accept user credentials.

    • Explain how to use Out-GridView to obtain user input.

    • Obtain user input by using Read-Host, Get-Credential, and Out-GridView.

    • Explain how to pass parameters to a script.

    • Obtain user input by using parameters.

  • This module covers troubleshooting PowerShell scripts and understanding error messages.

    Upon completion of this module, the learner will be able to:

    • Describe how error messages are stored.

    • Explain how to add more troubleshooting information to scripts.

    • Describe how to configure breakpoints for troubleshooting.

    • Explain how to troubleshoot a script.

    • Describe error actions in Windows PowerShell.

  • This module covers how to create modules and functions in Windows PowerShell scripts.

    Upon completion of this module, the learner will be able to:

    • Describe functions.
    • Describe the implications of variable scope.
    • Explain how to use dot sourcing.
    • Create a function in a script.
    • Explain how to create a module.
    • Create a module.

Syllabus

  • Create and run scripts by using Windows PowerShell
    • Introduction
    • Review Windows PowerShell scripts
    • Modify scripts in the PowerShell Gallery
    • Create scripts using Windows PowerShell
    • Review the PowerShellGet module in Windows PowerShell
    • Run scripts and set the execution policy in Windows PowerShell
    • Review Windows PowerShell and AppLocker
    • Sign the scripts digitally in Windows PowerShell
    • Module assessment
    • Summary
  • Work with scripting constructs in Windows PowerShell
    • Introduction
    • Review and use the ForEach loop in Windows PowerShell scripts
    • Review and use the If construct in Windows PowerShell scripts
    • Review and use the Switch construct in Windows PowerShell scripts
    • Review the For construct in Windows PowerShell scripts
    • Review other loop constructs in Windows PowerShell scripts
    • Review Break and Continue in Windows PowerShell scripts
    • Module assessment
    • Summary
  • Import data in different formats for use in scripts by using Windows PowerShell cmdlets
    • Introduction
    • Use the Get-Content command in Windows PowerShell scripts
    • Use the Import-Csv cmdlet in Windows PowerShell scripts
    • Use the Import-Clixml cmdlet in Windows PowerShell scripts
    • Use the ConvertFrom-Json cmdlet in Windows PowerShell scripts
    • Module assessment
    • Summary
  • Use methods to accept user inputs in Windows PowerShell scripts
    • Introduction
    • Identify values that might change in Windows PowerShell scripts
    • Use the Read-Host cmdlet in Windows PowerShell scripts
    • Use the Get-Credential cmdlet in Windows PowerShell scripts
    • Use the Out-GridView cmdlet in Windows PowerShell scripts
    • Pass parameters to a Windows PowerShell script
    • Module assessment
    • Summary
  • Troubleshoot scripts and handle errors in Windows PowerShell
    • Introduction
    • Interpret error messages generated for Windows PowerShell commands
    • Add output to Windows PowerShell scripts
    • Use breakpoints in Windows PowerShell scripts
    • Interpret error actions for Windows PowerShell commands
    • Module assessment
    • Summary
  • Use functions and modules in Windows PowerShell scripts
    • Introduction
    • Review functions in Windows PowerShell scripts
    • Use variable scope in Windows PowerShell scripts
    • Create modules in Windows PowerShell scripts
    • Use the dot sourcing feature in Windows PowerShell
    • Module assessment
    • Summary

Reviews

Start your review of Create and modify scripts by using Windows PowerShell

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.