# Ensure 'Xbox Live Game Save (XblGameSave)' is set to 'Disabled'

Necessity: The 'Xbox Live Game Save' service is a non-essential component for enterprise environments. Disabling it aligns with the principle of least functionality, which dictates that systems should only run services and software necessary for their business purpose. Keeping this service active unnecessarily consumes system resources and increases the system's attack surface, as any running service could potentially contain exploitable vulnerabilities. By disabling it, organizations reduce complexity and mitigate potential security risks associated with non-core functionalities. Auditing and Remediation: The audit script queries the Windows Service Control Manager to determine the current 'StartType' of the 'XblGameSave' service. The remediation script uses the 'Set-Service' cmdlet to modify this 'StartType', effectively preventing the service from being started by the system or applications. Recommended State Rationale: The recommended state for Basic, Moderate, and Strict security levels is 'Disabled'. This is because the service provides no essential function in a secure, production environment. There is no intermediate state that provides a security benefit; the most secure configuration is to disable it entirely, which applies across all hardening levels.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['Disabled']` |
| **Moderate** | `['Disabled']` |
| **Strict** | `['Disabled']` |
| **Type** | `ENUM` |

## Audit Script Working

PowerShell script that retrieves the 'StartType' of the 'XblGameSave' service. The script must output only the current value (e.g., 'Disabled', 'Automatic', 'Manual').

## Remediation Script Working

PowerShell script that sets the 'StartType' of the 'XblGameSave' service. The script must accept the desired state (e.g., 'Disabled') as a single positional command-line argument. It must return `$true` upon successful modification and `$false` upon failure.

