I managed to create a script/dashboard that monitors a log in a file for a keyword which then creates a log of it's own. I say managed because I have little to know coding skills. The problem I am having at the moment, is that while the script works, it doesn't actively monitor the file. I would like it to continuously look for this keyword indefinitely without reloading the dashboard.

**The code:**

```
Get-UDDashboard | Stop-UDDashboard
Start-UDDashboard -Port 1000 -Dashboard (
    New-UDDashboard -Title “SERVER STATUS DASHBOARD” -Content {
        New-UDHeading -Text "ACTIVE SERVICES" -Size 5   
        New-UDLayout   -Columns 6 -Content {  
            New-UDCard -Title 'Server Status' -Content {

                $SEL = Select-String -Path 'C:\Users\Server_log.txt' -Pattern "Server went down"

                if ($SEL -ne $null)
                {
                    Write-Host 'Contains String' -ForegroundColor Green
                    New-UDParagraph -Text 'Server is DOWN'-Color red

                } 

                else
                {
                    Write-Host 'Not Contains String' -ForegroundColor Red
                    New-UDParagraph -Text 'Server is UP'-Color Green
                }  
            } -AutoRefresh -RefreshInterval 5
        } 
    } 
 )

```

After scouring the internet, I added a "-AutoRefresh RefreshInterval 5" to no avail. The error I received was as follows:

```
***New-UDDashboard : Exception calling "Invoke" with "0" argument(s): "A parameter cannot be found that matches parameter name 'AutoRefresh'."
At C:\Users\Server_Status2.ps1:3 char:5
+     New-UDDashboard -Title “SERVER STATUS DASHBOARD” -Content ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SyntaxError: (UniversalDashboard.Models.Dashboard:Dashboard) [New-UDDashboard], CmdletInvocationException
    + FullyQualifiedErrorId : UniversalDashboard.Cmdlets.NewDashboardCommand***

```

Originally I assumed that the error was an indication that the cmdlet named "AutoRefresh" was not in my powershell environment. So I tried a script with that command in it that I knew worked, and it did actually work in my environment. So I know my environment does support "AutoRefresh". I believe the syntax is correct so i think that just leaves improper code structure to be the issue.

Any help would be appreciated. Thanks