Introduction

Completed

Accepting user input makes your scripts more flexible and easier for others to use. In this module, you'll learn multiple methods for accepting user input in a script.

Learning objectives

After completing this module, you'll 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.
  • Explain how to pass parameters to a script.

Prerequisites

Familiarity with:

  • Windows networking technologies and implementation
  • Windows Server administration, maintenance, and troubleshooting
  • Windows PowerShell and its commands to perform specific tasks
  • PowerShell cmdlets used for system administration tasks related to Active Directory, network configuration, server administration, and Windows client device administration (Windows 10 and Windows 11)
  • Windows PowerShell pipeline, PowerShell providers, and PowerShell drives
  • CIM and WMI technologies
  • The use of variables, arrays, and hash tables in Windows PowerShell