Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

ou 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_2

Step: 3

blur-text-image_3

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

Students also viewed these Databases questions