Interview Q&A

Harry · 13 Sep 2026 · 1 views

Q: What makes the PowerShell pipeline different from Unix pipes?

A: Unix pipes pass raw text; PowerShell passes .NET objects with properties. Consumers use those properties directly, so no text parsing is needed.

Q: What does $_ do?

A: $_ is the current object in the pipeline - inside Where-Object it is each item being filtered, inside ForEach-Object the element being processed.

Q: How do you run a command against 50 servers?

A: Invoke-Command -ComputerName with a script block executes in parallel and returns a result object per server, including success or failure status.

Q: Execution policy blocks a script - fix it?

A: Set-ExecutionPolicy RemoteSigned for the current user, or sign and mark the script as trusted; bypass only for vetted files.

Q: What are providers?

A: Providers expose non-file data as drive-like paths - the registry (HKLM:), the certificate store, environment variables (env:) - so the same Item cmdlets work everywhere.

Key Points

  • Objects, not text, define the pipeline.
  • $_ and providers are core vocabulary.
  • Remoting and jobs scale automation.
  • Know provider paths and execution policy.
Share this post:

Comments (0)

Please login or register to comment.