Multiple choice technology

Which one among the following is not valid while declaring the scope of a variable in PowerShell?

  1. $global:a = 1
  2. $public:a = 1
  3. $private:a = 1
  4. $local:a = 1
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

PowerShell variable scopes are: global, script, local, private, and (for modules) exported. 'public' is NOT a valid scope modifier. Options A, C, D are valid scope declarations.