Bird
0
0

What will be the result of this command?

medium📝 Command Output Q5 of 15
PowerShell - Remote Management
What will be the result of this command?
Enter-PSSession -ComputerName Server01 -Credential (Get-Credential)
when you provide valid credentials?
AStarts a local session ignoring credentials
BReturns an error because credentials are not accepted
CStarts a remote session on Server01 using the provided credentials
DLists all users on Server01
Step-by-Step Solution
Solution:
  1. Step 1: Understand -Credential parameter

    The -Credential parameter allows specifying user credentials for the remote session.
  2. Step 2: Analyze command behavior with valid credentials

    With valid credentials, the session starts remotely using those credentials.
  3. Final Answer:

    Starts a remote session on Server01 using the provided credentials -> Option C
  4. Quick Check:

    -Credential + valid creds = remote session [OK]
Quick Trick: Use -Credential to specify user for remote session [OK]
Common Mistakes:
  • Assuming credentials cause error always
  • Thinking session is local ignoring credentials
  • Expecting user list output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes