quizzes/Aliases.quiz.json

{
  "$schema": "https://raw.githubusercontent.com/jdhitsolutions/PSQuizMaster/main/psquiz.schema-v2.json",
  "metadata": {
    "name": "PowerShell Aliases",
    "author": "Jeff Hicks",
    "description": "A short quiz on using aliases in PowerShell.",
    "version": "0.4.0",
    "id": "68d30b11-971e-4104-9d76-d862bcef6a37",
    "updated": "2026-07-02 20:00:04Z"
  },
  "questions": [
    {
      "question": "What command will display [yellow italic]currently[/] defined PowerShell aliases?",
      "answer": "Get-Alias",
      "distractors": [
        "Show-Alias",
        "$PSAlias",
        "Get-AliasDefinition",
        "Find-PSAlias"
      ],
      "note": "You could also use the [gold1]Get-Alias[/] alias of [PaleTurquoise1 italic]gal[/]"
    },
    {
      "question": "What PSDrive shows PowerShell aliases?",
      "answer": "Alias",
      "distractors": [
        "A:",
        "$Alias",
        "psalias",
        "$PSAliasDrive"
      ],
      "note": "Remember,the drive name [fuchsia italic]does not[/] include the colon (:)."
    },
    {
      "question": "What command do you use to [italic]create[/] a custom alias?",
      "answer": "New-Alias",
      "distractors": [
        "Get-Alias",
        "Add-Alias",
        "New-PSDrive",
        "Import-Alias"
      ],
      "note": "You could use [gold1]Import-Alias[/] to recreate aliases exported with [gold1]Export-Alias[/]."
    },
    {
      "question": "How can you protect an alias from being overwritten?",
      "answer": "Set an option of [lime]ReadOnly[/] or [lime]Constant[/]",
      "distractors": [
        "You can't protect it",
        "Set the scope to [wheat1]private[/]",
        "Set the scope to [tan]global[/]",
        "use the $ReadOnly: prefix"
      ],
      "note": "Read the help for [gold1]Set-Variable[/] or [gold1]New-Variable[/]."
    }
  ]
}