Susan wrote a script alias.ps1 for creating an alias named gs1 for "get-service" command as:
new-alias -name gs1 -value get-service

Later Richard made a modification to the script alias.ps1, so that it now read:

new-alias -name gs1 -value get-service
set-alias -name gs1 -value get-process

Will the modification by Richard result in an error? If yes what change should be made so that it will execute error free?

It will execute without any error.

It will throw an error and the second command should be new-alias instead of set-alias.

It will throw an error. The name gs1 cannot be given as the new alias name to get-process command.

Only way to make gs1 to refer to get-process is by first removing it and then re-assigning it using new-alias command.

Verified Answer
Correct Option - a

To get all Infosys Certified L1 Junior Windows Admin Professional Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in