Write Filter Status Report - Wyse Device Manager - Wyse Software - Dell Community

Write Filter Status Report

  • Write Filter Status Report

    Hi

    Does anyone know a way to report the status of the write filter of all devices in WDM? I know I can click on each on and see the status but for 199 of them it will become somewhat tedious to do regularly.

    The only mention I can find on these forums is a post of 2011 saying that report is not yet available. Grateful if anyone has more up to date knowledge.

    Would be odd if you can't check the overview of a security feature for non-compliance.

    Cheers
    Andrew

  • Resolution, kind of
    So, whilst waiting for a response, I had a look around the RapportDB to see if there was/is anything in there which could be queried. As it happens, there is.

    Here is the SQL which can be ran to generate a list of clients, whose WF is disabled and the date and time of their last check-in.

    Code:

    SELECT [RapportDB].[dbo].[Client].[Name], [RapportDB].[dbo].[clientwritefilterstatus].[bWriteFilterStatus], [RapportDB].[dbo].[Client].[CheckIn]
     FROM [RapportDB].[dbo].[clientwritefilterstatus], [RapportDB].[dbo].[Client]
    where [RapportDB].[dbo].[clientwritefilterstatus].bWriteFilterStatus = 0
     and [RapportDB].[dbo].[clientwritefilterstatus].ClientId = [RapportDB].[dbo].[Client].ClientID 
     go

    I've now got a scheduled task which runs a batch file which calls this via SQLCMD.exe and outputs the above SQL to a log file. PowerShell then emails the log file to me.


    Its and bit of a hack but it works.

    If anyone wants to see the batch or PowerShell scripts just let me know.

    Andrew

  • Matt,

    No problem. I have the .sql, the .cmd and the .ps1 files in the same directory (C:\Scripts\WDM SQL Commands) and I run the batch file as a scheduled task on the WDM server.

    Notes:
    - Change paths as appropriate
    - Change usernames/passwords as appropriate
    - Change the SMTP server to yours
    - Change the To and From email addresses as appropriate
    - Check your PowerShell execution policy will allow the ps1 file to run.

    BATCH FILE:
    Code:

    @echo off
    cd "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn"
    
    SQLCMD.EXE -S pluto\rapportdb -U <USERNAME HERE> -P <PASSWORD HERE> -i "C:\scripts\WDM SQL Commands\WDM_Write_Filter_Status.sql" > "C:\scripts\WDM SQL Commands\WDM_Write_Filter_Status.log"
    
    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -file "C:\scripts\WDM SQL Commands\WDM_Write_Filter_Status_Email.ps1"
    POWERSHELL (which I can't take credit for - adapted from a colleague's script who I believe found it on the web):
    Code:
    $file = "C:\scripts\WDM SQL Commands\WDM_Write_Filter_Status.log"
    $smtpServer = "mail.mydomain.com"
    $att = new-object Net.Mail.Attachment($file)
    $msg = new-object Net.Mail.MailMessage
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = "WDM-Status@mydomain.com"
    $msg.To.Add("AllSystemsTeam@mydomain.com")
    $msg.Subject = "WDM Write Filter Status"
    $msg.Body = "Attached is the Wyse Device Manager report on Write Filter Status"
    $msg.Attachments.Add($att)
    $smtp.Send($msg)
    $att.Dispose()

    Any questions let me know.

    Cheers
    Andrew






  • Im hoping I run the script and it puts it in read/write mode, then reboots after? I presume this is the function of packaging?

  • Just to expand on the query I created the below to reflect some additional information such as IP, agent versions, and timezone info to note machines not updating settings.

    Brett

    Code:

    
    

    SELECT

    [RapportDB].[dbo].[Client].[Name] AS 'WYSE',

    [RapportDB].[dbo].[OSType].[Description] AS 'Description',

    [RapportDB].[dbo].[ClientNetwork].[IP] AS 'IP_Address',

    [RapportDB].[dbo].[ClientNetwork].[SubnetMask] AS 'Subnet',

    [RapportDB].[dbo].[ClientNetwork].[Gateway] AS 'Gateway',

    Case

    When [RapportDB].[dbo].[clientwritefilterstatus].[bWriteFilterStatus]=1

    Then 'Enabled'

    Else 'Disabled'

    End AS 'WriteFilter',

    [RapportDB].[dbo].[Client].[CheckIn] AS 'LastConnectTime',

    [RapportDB].[dbo].[Client].[Image] AS 'DiskInfo',

    [RapportDB].[dbo].[Client].[AgentVersion] AS 'AgentVer',

    [RapportDB].[dbo].[Client].[AgentLocation] AS 'AgentFolder',

    [RapportDB].[dbo].[Client].[TZOffset] AS 'DaylightBias',

    [RapportDB].[dbo].[Client].[TZText] AS 'TimeZone'

     

    FROM

    [RapportDB].[dbo].[clientwritefilterstatus],

    [RapportDB].[dbo].[Client],

    [RapportDB].[dbo].[ClientNetwork],

    [RapportDB].[dbo].[OSType]

     

    Where

    [RapportDB].[dbo].[clientwritefilterstatus].ClientId = [RapportDB].[dbo].[Client].ClientID and

    [RapportDB].[dbo].[ClientNetwork].ClientId = [RapportDB].[dbo].[Client].ClientID and

    [RapportDB].[dbo].[OSType].[OSTypeID] = [RapportDB].[dbo].[Client].[OSTypeID]

     

    ORDER BY

    [RapportDB].[dbo].[Client].[Name] ASC