An administrator privilege is elevated authorization for operations unavailable to a standard user. In PowerShell remoting, Administrators can connect by default, while Remote Management Users retain standard-user rights unless separately authorized. section 5.3.2
Use elevation when an automation must read protected user-profile files, write system configuration, or access administrative resources. Choose the execution context deliberately: administrator and system contexts can write machine-level locations, while system cannot access the user profile or user registry. section 5.3.2 section 11.4.2
Build reliable administrative automation by:
- Granting membership in the local Administrators group when the task genuinely requires it. section 5.3.2
- Testing the installation first in an elevated PowerShell window, then under standard-user and system contexts. section 11.4.2
- Validating both behavior and resulting configuration, then uninstalling or restoring the test machine. section 11.4.2
Installing and validating Git
An elevated script can install Git and write system-level configuration. Check the result with git config --list --show-scope; system settings such as core.autocrlf appear separately from global settings such as init.defaultbranch. Running the same workflow as a standard user exposes UAC prompts and failures when system configuration requires elevation. section 11.4.2
Add-LocalGroupMember -Group "Administrators" -Member "<YourUser>"
Add a user to the local Administrators group from an administrative PowerShell prompt when protected profile access is required. section 5.3.2
