# 2. Get UWF Status
try {
    $UwfObject = Get-CimInstance -Namespace "root\standardcimv2\embedded" -ClassName UWF_Filter -ErrorAction Stop
    $IsUwfEnabled = $UwfObject.CurrentEnabled
} catch {
    # If command fails (e.g., older Windows), write a warning
    Write-Warning "Failed to get status via Get-UwfFilter. Is the UWF feature installed?"
    $IsUwfEnabled = $false
}

if($IsUwfEnabled) {
    exit(0)
}
else {
    exit(1)
}
