CompTIA Server+ SK0-005 Practice Question

A Windows Server 2022 administrator is creating a PowerShell script that will

  1. stop a custom service,
  2. apply a security patch,
  3. restart the same service.

The script must run automatically every time the server is shut down for scheduled maintenance and must execute with Local System privileges without requiring any ongoing user interaction. Which implementation method best meets these requirements with the least administrative overhead?

  • Assign the script as a computer Shutdown script in Local (Group) Policy under Computer Configuration > Windows Settings > Scripts (Startup/Shutdown).

  • Add the script path to the PowerShell $Profile of the built-in Administrator account so it executes whenever that user starts a shell.

  • Copy a shortcut to the script into C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup so it launches during startup and shutdown.

  • Create a Scheduled Task that triggers on User Logoff and runs the script with the highest privileges.

CompTIA Server+ SK0-005
Server Administration
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

SAVE $47
$390.00 $343.00
SAVE $53
CompTIA Server+ Voucher with Retake
v5 / SK0-005
Includes Retake
$439.00 $386.00
Bash, the Crucial Exams Chat Bot
AI Bot