Question: You have created a script named GetRemoteService.PS 1 on the root of drive C: The script uses Invoke - Command to get services from

You have created a script named GetRemoteService.PS1 on the root of drive C:\
The script uses Invoke-Command to get services from a remote computer. The script contains the following PowerShell syntax.
[CmdletBinding()]
param (
[Parameter (Mandatory=$True)]
[Alias (HostName)]
[String] $ComputerName
)
Invoke-Command ComputerName $ComputerName ScriptBlock {Get-Service}Credential HUSOT
Which syntax below will work correctly when you run the script and pass a value to the parameter from within PowerShell? (Choose all that apply)
Group of answer choices
C:\ GetRemoteService.PS1 Client1
C:\ GetRemoteService.PS1HostName Client1
C:\ GetRemoteService.PS1ComputerName Client1
C:\ GetRemoteService.PS1Name Client1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!