0
0
PowerShellscripting~10 mins

Enter-PSSession in PowerShell - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start an interactive session with a remote computer named 'Server01'.

PowerShell
Enter-PSSession -ComputerName [1]
Drag options to blanks, or click blank then click option'
AServer01
Blocalhost
CRemotePC
DMyServer
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'localhost' instead of the remote computer name.
Misspelling the computer name.
2fill in blank
medium

Complete the code to enter a session on a remote computer using the IP address '192.168.1.10'.

PowerShell
Enter-PSSession -ComputerName [1]
Drag options to blanks, or click blank then click option'
AServerName
BRemoteHost
Clocalhost
D192.168.1.10
Attempts:
3 left
💡 Hint
Common Mistakes
Using a hostname instead of the IP address when the task asks for IP.
Typing an incorrect IP address.
3fill in blank
hard

Fix the error in the code to enter a session on 'Server02' using the correct parameter name.

PowerShell
Enter-PSSession -[1] Server02
Drag options to blanks, or click blank then click option'
AComputerName
BHostName
CServer
DRemoteName
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect parameter names like -HostName or -Server.
Omitting the parameter name.
4fill in blank
hard

Fill both blanks to enter a session on 'Server03' using the username 'AdminUser'.

PowerShell
Enter-PSSession -ComputerName [1] -Credential (Get-Credential -UserName [2])
Drag options to blanks, or click blank then click option'
AServer03
BAdminUser
CUserName
DCredential
Attempts:
3 left
💡 Hint
Common Mistakes
Using parameter names instead of values in the blanks.
Swapping the computer name and username.
5fill in blank
hard

Fill all three blanks to enter a session on 'Server04' with username 'User1' and specify the port 5986.

PowerShell
Enter-PSSession -ComputerName [1] -Credential (Get-Credential -UserName [2]) -Port [3]
Drag options to blanks, or click blank then click option'
AServer04
BUser1
C5986
DAdmin
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong port number.
Confusing username with computer name.