Is Your Monitor Truly Off?

how to tell if monitor is powered off remotly

There are several ways to check if a monitor is powered off remotely. One method is to use software such as TeamViewer or Windows Remote Desktop to access the machine and check the status of the monitor. Another way is to use a command-line tool such as PowerShell to query the monitor's power status. Additionally, for Windows PCs, there is a feature called Turn Off Display which can be checked using a one-liner code snippet. However, it is important to note that not all monitors support the necessary APIs for remote power status checks.

Characteristics Values
Connection type VGA, HDMI, SUB-D (VGA), display port, DVI-D
Software AnyDesk, TeamViewer, PowerShell
Operating system Windows 7, Windows 10

shundigital

Check monitor status using PowerShell

To check the status of your monitor using PowerShell, you can use the following methods:

Using Get-CimInstance

One way to check your monitor's status is by using the Get-CimInstance cmdlet. You can use the following command:

Powershell

Get-CimInstance -Namespace root\wmi -ClassName wmiMonitorID).Active

This command will return "True" if the monitor is powered on and "False" if it is powered off.

Using Get-WmiObject

Another way to check the status of your monitor is by using the Get-WmiObject cmdlet. Here's the command:

Powershell

Gwmi WmiMonitorID -Namespace root\wmi

This command will return information about the monitor, including its active status. You can then check the "Active" property to determine if the monitor is powered on or off.

Using Win32_VideoController Class

You can also use the Win32_VideoController WMI class to get information about your monitor's resolution and other settings. Here's the command:

Powershell

Get-WmiObject win32_videocontroller | select caption, CurrentHorizontalResolution, CurrentVerticalResolution

This command will return information about the video controller and its resolution settings.

Using Win32_DesktopMonitor Class

To get information specifically about your desktop monitor, you can use the Win32_Desktopmonitor WMI class:

Powershell

Get-WmiObject win32_desktopmonitor

This command will return information about your desktop monitor, such as screen height and width.

Using WmiMonitorBasicDisplayParams Class

If you're using Windows 8 or newer, you can use the WmiMonitorBasicDisplayParams WMI class, which provides information about whether a display is active and its capabilities:

Powershell

Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBasicDisplayParams

This command will return information about the active displays and their capabilities.

By using these PowerShell commands, you can remotely check the status of your monitor and obtain detailed information about its manufacturer, model, serial number, resolution, and other relevant settings.

shundigital

Use TeamViewer to check monitor status

TeamViewer is a remote desktop sharing app that can be used to monitor activity. It is also used by IT support teams to remotely access computers for troubleshooting, updates, and software installs. When someone connects to your computer via TeamViewer, you will usually see a notification about it in the bottom right corner above the start menu. You will also receive a message in the middle of your screen when someone logs off of your computer.

TeamViewer Monitoring provides early recognition of problems in your IT infrastructure and alerts you when and where your attention is required. This helps you to monitor the operational state of servers, workstations, and network devices by tracking CPU usage, memory usage, and running processes/services.

TeamViewer Monitoring can be accessed in TeamViewer Remote or the web app by clicking the Remote Management tab on the left-hand menu. The Overview tab provides quick-access information that allows you to see what devices may need more immediate attention. The graphs provide various information regarding the last 7 days, including an alert summary by day, alert status summary, device alert history, and the top 10 devices with the most alerts.

To check the status of your monitor using TeamViewer, you can follow these steps:

  • Open TeamViewer Remote or the web app.
  • Click on the Remote Management tab on the left-hand menu.
  • Go to the Overview tab to see quick-access information about the status of your devices.
  • Review the graphs to see information about alerts over the last 7 days, including alert summaries, device alert history, and more.
  • If you want more detailed information about a specific alert, click on the three-dot menu in the upper-right corner of the graph to access the Alerts History.
  • In the Alerts History, you can filter and organize alerts to see if there are any related to your monitor status.

By using TeamViewer Monitoring, you can stay on top of any issues with your monitor and other devices and quickly resolve them.

shundigital

Use WMI Win32_DesktopMonitor class to determine monitor status

The Win32_DesktopMonitor WMI class represents the type of monitor or display device attached to the computer system. It has 28 properties, including 'Availability', 'Bandwidth', 'Caption', 'ConfigManagerErrorCode', 'ConfigManagerUserConfig', 'CreationClassName', 'Description', 'DeviceID', 'DisplayType', 'ErrorCleared', 'ErrorDescription', 'InstallDate', 'IsLocked', 'LastErrorCode', 'MonitorManufacturer', 'MonitorType', 'Name', 'PixelsPerXLogicalInch', 'PixelsPerYLogicalInch', 'PNPDeviceID', 'PowerManagementCapabilities', 'PowerManagementSupported', 'ScreenHeight', 'ScreenWidth', 'Status', 'StatusInfo', 'SystemCreationClassName', and 'SystemName'.

Hardware that is not compatible with the Windows Display Driver Model (WDDM) returns inaccurate property values for instances of this class.

To determine the status of a monitor, you can use the following PowerShell code:

Powershell

Get-CimInstance -ClassName Win32_DesktopMonitor | Select-Object -Property Caption, Availability

This will retrieve the instances of the Win32_DesktopMonitor class and display the caption and availability status of each monitor. The availability status can be translated into a meaningful text value using a PowerShell Hashtable, switch statement, or Enum.

Powershell

$Availability_map = @{

1 = 'Other'

2 = 'Unknown'

3 = 'Running/Full Power'

4 = 'Warning'

5 = 'In Test'

6 = 'Not Applicable'

7 = 'Power Off'

8 = 'Off Line'

9 = 'Off Duty'

10 = 'Degraded'

11 = 'Not Installed'

12 = 'Install Error'

13 = 'Power Save - Unknown'

14 = 'Power Save - Low Power Mode'

15 = 'Power Save - Standby'

16 = 'Power Cycle'

17 = 'Power Save - Warning'

18 = 'Paused'

19 = 'Not Ready'

20 = 'Not Configured'

21 = 'Quiesced'

}

$friendlyValues = Get-CimInstance -Class Win32_DesktopMonitor | Select-Object -Property Availability | Select-Object -ExpandProperty Availability

$friendlyValues -join ', '

This code defines a Hashtable called `$Availability_map` that maps the numeric availability values to their corresponding text values. It then retrieves the availability property for each instance of the Win32_DesktopMonitor class and stores the values in the `$friendlyValues` variable. Finally, it outputs the translated availability values as a comma-separated list.

You can also use a switch statement or Enum to translate the availability values into meaningful text.

shundigital

Check monitor status using VBScript

VBScript is a subset of Visual Basic that allows you to include simple to very complex programs in your daily system administration tasks. It is executed by the VBScript Engine, which is part of the operating system.

To check the monitor status using VBScript, you can follow these steps:

First, ensure that your virus scanner and/or security policies allow the processing of VBScript files. Blocking VBScript functions may result in the script never executing.

Next, create a new VBScript file with a .vbs extension, for example, "monitor_status.vbs". Open this file with a text editor and copy the following code:

Vb

Option Explicit

Dim objWMIService, colItems

StrComputer = "."

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" & strComputer & "\root\wmi")

Set colItems = objWMIService.ExecQuery ("SELECT * FROM WMIMonitorID")

Msgbox strComputer & " has " & colItems.count & " monitors configured"

Save the file and double-click on it to execute the script. This script will display a message box showing the number of monitors configured for the computer.

Alternatively, you can use the following code snippet, which queries the "Win32_VideoController" class to count the number of active resolutions:

Vb

Set objShell = CreateObject("WScript.Shell")

StrComputer = InputBox("Enter the PC number you wish to run this script on", "Enter the PC number")

If strComputer = "" then

Wscript.echo "No PC number supplied. Quitting Program"

Wscript.quit

End if

IntMonitorCount = 0

If Ping(strComputer) then

Dim objWMI : Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=Impersonate}!\\" & strComputer & "\root\cimv2")

Dim colSettingsVideo : set colSettingsVideo = objWMI.ExecQuery("Select * from Win32_VideoController")

For each objComputer in colSettingsVideo

If not isnull(objComputer.VideoModeDescription) then

IntMonitorCount = intMonitorCount + 1

End if

Next

If intMonitorCount = 1 then

Wscript.echo "There is ", intMonitorCount, " monitor attached to ", strComputer

Else

Wscript.echo "There are ", intMonitorCount, " monitors attached to ", strComputer

End if

End if

Function Ping(PC)

Set objWshScriptExec = objShell.Exec("ping.exe -n 1 " & PC)

Set objStdOut = objWshScriptExec.StdOut

Awake=False

Do Until objStdOut.AtEndOfStream

StrLine = objStdOut.ReadLine

Awake = awake Or InStr(LCase(strLine), "bytes=") > 0

Loop

Ping = awake

End Function

Save this code in a .vbs file and execute it in the same way as the previous script. This script will prompt you to enter the PC number and then display the number of monitors attached.

shundigital

Check if the monitor is listed in Device Manager

If you want to check if your monitor is powered off remotely, one method is to check if the monitor is listed in Device Manager. Here's how to do it:

First, open the Device Manager. On Windows, you can do this by pressing the Windows logo key on your keyboard and typing "Device Manager" in the search bar. Then, select Device Manager from the list of options.

Next, in the Device Manager window, look for the "Display adapters" section. You can find this by scrolling down the list of devices or by expanding the different categories. The "Display adapters" section will list all the graphics cards and their connected monitors.

If your monitor is listed here, it means it is recognised by your computer and is likely powered on. If it is not listed, it could mean that the monitor is powered off or not properly connected.

It is important to note that the behaviour of Device Manager can vary depending on the type of connection your monitor uses. For example, if your monitor is connected through HDMI or VGA, Windows may always list these devices as connected even if they are turned off. On the other hand, if your monitor is connected through DisplayPort or DVI-D, Windows will install and uninstall the monitor as a plug-and-play device, so its presence in Device Manager will accurately reflect its power state.

Additionally, if you are using an NVIDIA GPU, you may see multiple monitors listed in Device Manager even if you only have one or two physical monitors connected. This is because NVIDIA drivers create a display for every possible display output, so you may see additional entries even if you only have one monitor.

If you are still unsure about the power state of your monitor, you can try some basic hardware troubleshooting steps. Ensure that the cable connecting your computer to the monitor is secure and try using a different cable if possible. You can also try using the monitor with a different system to isolate whether the issue is with the monitor or your computer.

Frequently asked questions

If you're using Windows Remote Desktop or TeamViewer to access your machine, you can use the WMI Win32_DesktopMonitor class with the "Availability" property to determine if your monitor is on or off.

You can also use PowerShell, which includes a command-line shell, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules.

Yes, you can use the built-in function in TeamViewer to black out the remote screen by disabling remote input during an active session. This will ensure that your monitor remains off while you are connected remotely.

Written by
Reviewed by
Share this post
Print
Did this article help you?

Leave a comment