Summary

Completed

In this module, you learned about various methods that allow you to accept user input in PowerShell scripts. Key takeaways:

  • Use the Read-Host cmdlet to obtain input from users while a script is running.

  • The Get-Credential cmdlet lets you use an administrative account while you're signed in to a standard user account.

  • Use Export-Clixml to encrypt and store a credential object to an XML file.

  • Use the SecretManagement module from the PowerShell Gallery to store and retrieve credentials.

  • Use Out-GridView to review data or create a simple menu selection interface.

  • Use a Param() block to define the variables that store parameter values.

Additional reading

To learn more, go through the following documents: