Bird
0
0

You want to run a command on multiple remote computers using PSSessions. Which approach is best?

hard📝 Application Q8 of 15
PowerShell - Remote Management
You want to run a command on multiple remote computers using PSSessions. Which approach is best?
ACreate multiple PSSessions, run commands in parallel, then remove sessions
BUse Enter-PSSession to connect to each computer one by one interactively
CCreate one PSSession and reuse it for all computers
DRun commands locally without PSSessions
Step-by-Step Solution
Solution:
  1. Step 1: Understand parallel remote execution

    Creating multiple PSSessions allows running commands on many computers at once.
  2. Step 2: Evaluate other options

    Enter-PSSession is interactive and one at a time, one session per computer is needed, running locally won't affect remotes.
  3. Final Answer:

    Create multiple PSSessions, run commands in parallel, then remove sessions -> Option A
  4. Quick Check:

    Parallel remote commands need multiple PSSessions [OK]
Quick Trick: Use multiple sessions for parallel remote commands [OK]
Common Mistakes:
  • Using Enter-PSSession for batch jobs
  • Trying to reuse one session for many computers
  • Running commands locally expecting remote effect

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes