PrepAway - Latest Free Exam Questions & Answers

Which PowerShell cmdlet should you use?

You have three computers that run Windows 7.
You use Windows PowerShell to perform remote administration tasks on all three computers.
You need to remotely administer all three computersby using PowerShell.
Which PowerShell cmdlet should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Enable-PSRemoting

B.
Enable-PSSessionConfiguration

C.
New-PSDrive

D.
New-PSSession

Explanation:
10186 20151
New-PSSession
Creates a persistent connection to a local or remote computer.
The New-PSSession cmdlet creates a Windows PowerShell session (PSSession) on a local or remote
computer. When you create a PSSession, Windows PowerShell establishes a persistent connection to the
remote computer.
Use a PSSession to run multiple commands that sharedata, such as a function or the value of a variable. To
run commands in a PSSession, use the Invoke-Commandcmdlet. To use the PSSession to interact directly
with a remote computer, use the Enter-PSSession cmdlet.
You can run commands on a remote computer without creating a PSSession by using the ComputerName
parameters of Enter-PSSession or Invoke-Command. When you use the ComputerName parameter, Windows
PowerShell creates a temporary connection that is used for the interactive session or for a single command and
is then closed.


Leave a Reply