Public/Get-UWFStatus.ps1

Function Get-UWFStatus {
    <#
    .SYNOPSIS
        Display Unified Write Filter Status
    .DESCRIPTION
        Display Unified Write Filter Status
    .INPUTS
        None
    .EXAMPLE
        Get-UWFStatus
    .LINK
        about_functions_advanced
    .LINK
        about_CommonParameters
    #>

    [CmdletBinding()]
    Param()

    Begin { }

    Process {
        If (!$Script:UWF) {
            Throw "Unable to retrieve Unified Write Filter settings."
        }
        $Properties = @{
            CurrentEnabled  = $UWF.CurrentEnabled
            HORMEnable      = $UWF.HORMEnabled
            NextEnabled     = $UWF.NextEnabled
            ShutdownPending = $UWF.ShutdownPending
        }
        $Status = New-Object -TypeName psobject -Property $Properties
    }

    End {
        Return $Status
    }
}