Courseiva

CPENT Practice Question: Privilege Escalation Lateral Movement And Post Exploitation

A penetration tester executing lateral movement in a Windows domain wants to hide their network activity and command execution by using WinRM (Windows Remote Management). Which PowerShell cmdlet is specifically designed to execute commands on a remote trusted host via WinRM?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Invoke-Command -ComputerName TargetHost -ScriptBlock { ... }

Invoke-Command allows running script blocks or scripts on local or remote computers using WinRM.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Get-WmiObject -ComputerName TargetHost -Class Win32_Process

    Why it's wrong here

    Get-WmiObject queries WMI, whereas WinRM utilizes PowerShell Remoting (WS-Management).

  • Start-Process -FilePath "powershell.exe" -Credential ...

    Why it's wrong here

    Start-Process runs processes locally on the current machine.

  • Invoke-Command -ComputerName TargetHost -ScriptBlock { ... }

    Why this is correct

    Invoke-Command runs commands on remote computers and returns output as objects.

  • Enter-PSSession -ComputerName TargetHost

    Why it's wrong here

    Enter-PSSession starts an interactive remote session, which is less ideal for automated lateral movement script execution compared to Invoke-Command.

About these practice questions

This CPENT question is part of Courseiva's 274-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official EC-Council exam blueprint

This CPENT practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CPENT exam.