Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 5 subjective questions PowerShell Basics and Core Concepts

CSC104 — It Fundamentals 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define PowerShell and explain how it differs from a traditional command-line shell.

  2. Question 2 of 20

    Compare the PowerShell Console and PowerShell ISE. Describe a suitable use case for each.

  3. Question 3 of 20

    Describe the steps required to create, save, and execute a PowerShell script file. Also explain the purpose of the execution policy.

  4. Question 4 of 20

    Explain how variables are declared and used in PowerShell. Discuss variable naming, data types, and type casting with examples.

  5. Question 5 of 20

    Explain how PowerShell accepts user input. Write and explain a script that reads two numbers and displays their sum.

  6. Question 6 of 20

    Distinguish between single-line comments, block comments, and comment-based help in PowerShell.

  7. Question 7 of 20

    What is a PowerShell cmdlet? Explain its naming convention, parameters, aliases, and command-discovery facilities.

  8. Question 8 of 20

    Explain the PowerShell pipeline and demonstrate how objects move through a multi-stage pipeline.

  9. Question 9 of 20

    Classify the major operators available in PowerShell and provide examples of their use.

  10. Question 10 of 20

    Describe the syntax and working of if, elseif, and else statements. Write a PowerShell example that assigns a grade from a numeric score.

  11. Question 11 of 20

    Explain the switch statement in PowerShell. How can it be used for exact, wildcard, and regular-expression matching?

  12. Question 12 of 20

    Compare the for, foreach, while, and do loops in PowerShell. State when each loop is appropriate.

  13. Question 13 of 20

    Explain arrays in PowerShell. Describe how to create, access, modify, iterate over, and inspect an array.

  14. Question 14 of 20

    What is a PowerShell hashtable? Explain how to create, access, update, remove, and enumerate key-value pairs.

  15. Question 15 of 20

    Describe how functions are defined in PowerShell. Write an advanced function with a parameter, validation, pipeline support, and a return value.

  16. Question 16 of 20

    Explain variable scope in PowerShell. Distinguish among global, script, local, and private scopes.

  17. Question 17 of 20

    Explain basic error handling in PowerShell using try, catch, finally, throw, and -ErrorAction.

  18. Question 18 of 20

    Describe how PowerShell's help system is used to discover command syntax, parameters, concepts, and examples.

  19. Question 19 of 20

    What is a PowerShell profile? Explain how profiles are located, created, edited, and used safely.

  20. Question 20 of 20

    Design a PowerShell script that reads a list of service names, checks each service, and reports its status. Explain how the script combines parameters, arrays, loops, pipelines, functions, and error handling.

That's unit 5

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.