# 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
}

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