quizzes/Aliases.quiz.json

{
  "$schema": "https://raw.githubusercontent.com/jdhitsolutions/PSQuizMaster/main/psquiz.schema.json",
  "metadata": {
    "name": "PowerShell Aliases",
    "author": "Jeff Hicks",
    "description": "A short quiz on using aliases in PowerShell.",
    "version": "0.2.3",
    "id": "68d30b11-971e-4104-9d76-d862bcef6a37",
    "updated": "2023-08-06 23:55:09Z"
  },
  "questions": [
    {
      "question": "What command will display currently defined PowerShell aliases?",
      "answer": "Get-Alias",
      "distractors": [
        "Show-Alias",
        "$PSAlias",
        "Get-AliasDefinition",
        "Find-PSAlias"
      ],
      "note": ""
    },
    {
      "question": "What PSDrive shows PowerShell aliases?",
      "answer": "Alias",
      "distractors": [
        "A:",
        "$Alias",
        "psalias",
        "$PSAliasDrive"
      ],
      "note": "The drive name, does not include the colon (:)."
    },
    {
      "question": "What command do you use to create a custom alias?",
      "answer": "New-Alias",
      "distractors": [
        "Get-Alias",
        "Add-Alias",
        "New-PSDrive",
        "Import-Alias"
      ],
      "note": "You could use Import-Alias to recreate aliases exported with Export-Alias."
    },
    {
      "question": "How can you protect an alias from being overwritten?",
      "answer": "Set an option of ReadOnly or Constant",
      "distractors": [
        "You can't protect it",
        "Set the scope to private",
        "Set the scope to global"
      ],
      "note": ""
    }
  ]
}