Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions