# Ensure 'Computer Browser (Browser)' is set to 'Disabled' or 'Not Installed'

Necessity: The 'Computer Browser' service maintains an updated list of computers on the network using the legacy NetBIOS protocol. This service is outdated and not required in modern networks that rely on DNS for name resolution. When enabled, it broadcasts network information that can be leveraged by attackers for network reconnaissance, mapping network shares, and identifying potential targets. Disabling this service reduces the system's attack surface and prevents information leakage.

Auditing and Remediation: The audit script verifies the current startup configuration of the 'Browser' service to ensure it is not set to an enabled state. The remediation script alters the service's configuration by setting its startup type to 'Disabled' and ensuring the service is stopped, thereby preventing it from running automatically or manually.

Recommended State Rationale: 
Basic: The recommended state is 'Disabled' or 'Not Installed'. This is the baseline for any secure environment, as the service provides no essential function in modern networks and introduces unnecessary security risks.
Moderate: This state is identical to Basic. Because the service is a legacy component with known security implications, there is no secure middle-ground; it must be disabled.
Strict: This state is also identical to Basic and Moderate. The most secure configuration is to have the service disabled or not present on the system. There is no stricter setting available, making this the universal recommendation across all hardening levels.

## Recommended State Configuration

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

## Audit Script Working

PowerShell script that checks the startup type of the 'Computer Browser' (Browser) service. The script should use the 'Get-Service' cmdlet. If the service does not exist, it must return the string 'Not Installed'. Otherwise, it should return only the current start type of the service (e.g., 'Disabled', 'Automatic', 'Manual').

## Remediation Script Working

PowerShell script that accepts a single positional string argument specifying the desired state for the 'Computer Browser' (Browser) service (e.g., 'Disabled'). The script must use 'Set-Service' to configure the service's startup type to the provided value. If the service is running, it should also be stopped. The script must return '$true' if the service is successfully configured to the desired state or if it is already in that state. It should return '$false' if the operation fails.

