PowerShell Genie

Process health snapshot: a guided PowerShell project

Lab 12 min read Multi-step project · fictional data throughout

Documentation: Microsoft Learn

Milestone 1 — Discover the data

Not checked yet

Run Get-Process and open the Sample data tab. Name the properties each process object carries (Name, CPU, WS, Id). Everything downstream depends on knowing what the objects actually contain — not what you assume they contain.

Milestone 1 workspace

Sample environment
Step through, copy or reset
OutputReady when you are
Run the example to inspect its sample result.

Fictional data. Nothing runs on your device or tenant.

Follow the objects

Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.

    Run or step through the command to follow its objects.

    Milestone 2 — Catch the cpu burners

    Not checked yet

    Keep only processes with CPU greater than 100. Choose Step from start repeatedly to compare the source objects with the filtered result. Inspect the CPU values in Sample data to explain which objects were kept or dropped.

    Milestone 2 workspace

    Sample environment
    Step through, copy or reset
    OutputReady when you are
    Run the example to inspect its sample result.

    Fictional data. Nothing runs on your device or tenant.

    Follow the objects

    Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.

      Run or step through the command to follow its objects.

      Milestone 3 — Rank by memory

      Not checked yet

      Order all processes by working set, largest first, and keep the top three. Sorting never changes which objects you have — only their order. Finish the pipeline, then Check answer.

      Milestone 3 workspace

      Sample environment
      Step through, copy or reset
      OutputReady when you are
      Run the example to inspect its sample result.

      Fictional data. Nothing runs on your device or tenant.

      Follow the objects

      Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.

        Run or step through the command to follow its objects.

        Milestone 4 — Shape the report

        Not checked yet

        A report is objects with the right properties and nothing else. Take the CPU burners from milestone 2 and project just Name, CPU and WS. Extra properties are noise in a morning check.

        Milestone 4 workspace

        Sample environment
        Step through, copy or reset
        OutputReady when you are
        Run the example to inspect its sample result.

        Fictional data. Nothing runs on your device or tenant.

        Follow the objects

        Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.

          Run or step through the command to follow its objects.

          Milestone 5 — Assemble and defend

          Not checked yet

          Assemble the final snapshot: all processes, sorted by CPU descending, top three, with Name, CPU and WS. Then defend it below: what does this snapshot prove, and what does it not prove?

          Milestone 5 workspace

          Sample environment
          Step through, copy or reset
          OutputReady when you are
          Run the example to inspect its sample result.

          Fictional data. Nothing runs on your device or tenant.

          Follow the objects

          Each stage shows the objects after one command. Choose Step from start repeatedly to move through the stages, or Run to see the final result.

            Run or step through the command to follow its objects.

            Defend it

            In one paragraph, defend your snapshot the way you would in standup: what does it prove, and what does it not prove? Then compare with the model defense.

            Compare with a model defense

            This snapshot proves which processes had accumulated the most CPU time and held the largest working sets at the moment it ran, in a repeatable one-line form. It does not prove a leak or a hang: one snapshot cannot show a trend, CPU time is cumulative since process start (not current load), and working set is resident memory now — so the honest next step is to re-run it under a comparable workload and compare.

            Process snapshot handover

            Deliver a usable report

            Record the computer, collection time, process name, ID, working set in bytes and accumulated CPU time. Preserve a second observation if the question concerns change.

            Test the failure path

            A process exits between collection and inspection. Keep its identity and timestamp; do not assume a later process with the same name is the same instance.

            Verify before handing over

            Compare one process by ID with a direct query. Working set is a snapshot, while CPU is accumulated time rather than a utilization percentage.

            Complete each checked milestone above. Completion records show practice against fictional data; they do not certify a production script.

            Apply this project to the next admin task

            Practise the next scenario

            Report process memory

            Return Name and WorkingSet64 for all processes, highest memory first.

            Review the lesson

            Genie guideProcess health snapshot: a guided PowerShell project

            Run Get-Process and open the Sample data tab. Name the properties each process object carries (Name, CPU, WS, Id). Everything downstream depends on knowing what the objects actually contain — not what you assume they contain.