PowerShell Automation Quiz

5 questions Pass: 70% +25 pts (50 with Pro)

Quiz covering Infrastructure as Code

What you'll be asked

  1. Which PowerShell cmdlet is primarily used to retrieve information about a SQL Server instance when using the SqlServer module?
  2. When automating database deployments using Infrastructure as Code, which practice ensures that your script can be run multiple times without causing errors or duplicate data?
  3. You need to execute a T-SQL script file against a database using PowerShell. Which cmdlet is the most appropriate for this task?
  4. In a CI/CD pipeline, how should you best handle sensitive database connection strings or passwords in your PowerShell automation scripts?
  5. When using the 'dbatools' module to migrate a database, which parameter is required to ensure that the source database remains online and accessible during the copy process?

Answers and explanations come after you submit.