freelanceasfen.blogg.se

Desktopmonitor wmic
Desktopmonitor wmic






desktopmonitor wmic
  1. #Desktopmonitor wmic Pc#
  2. #Desktopmonitor wmic windows#

Regards, Nathan Owen (Microsoft Certified Systems Engineer) - Please remember to click "Mark as Answer" on the post that helps you. Wmic /user:bob /password:builder /output:TCRes.txt desktopmonitor get screenheight,screenwidth Once you have remote access, you can elevate WMIC by using the /user and /password switches, for example: Netsh firewall add portopening protocol=tcp port=135 name=DCOM_TCP135 If your also enabling Remote Desktop, then all you need to do to allow WMI through the firewall is to add TCP port 135 as an exception, or use the following command: So yep, if you don't have any form of remote access, such as VNC, then you would need to visit these PC's to make that change. To: Classic - local users authenticate as themselves WMI also gives you the ability shut down a remote computer. For example, you can determine whether the screensaver on a local computer requires a password. The guest account, or modify the following policy under Local Security Settings > Local Policies > Security Options:Ĭhange Network access: Sharing and security model for local accountsįrom: Guest only - local users authenticate as Guest WMI tasks for desktop management can exert control and obtain data from either a remote desktop or a local computer.

#Desktopmonitor wmic Pc#

Bottom Line, in your environment, you would need to visit each PC and either enable However, in this configuration, even if you elevate to a local administrative account, by default your forced to use the guest account, which is should also be disabled.

#Desktopmonitor wmic windows#

Well, there are many ways to elevate in WMI, and there are also many ways to disable or add exceptions to Windows Firewall on a remote PC. DESKTOP - User's Desktop DESKTOPMONITOR - Desktop Monitor DEVICEMEMORYADDRESS - Device memory addresses DISKDRIVE - Physical disk drive DISKQUOTA - Disk space usage for NTFS volumes.SET DMACHANNEL - Direct memory access (DMA) channel ENVIRONMENT - System environment settings SET FSDIR - Filesystem directory entry CALL GROUP - Group. So, my system returns three display devices, but only two of them have values at the moment. My machine has two monitors currently attached and I often connect a projector to it at other time and/or use the screen on the laptop. 'wmic DESKTOPMONITOR get DeviceID^,ScreenHeight^,ScreenWidth'Ĭall echo Your resolution on %%MyDeviceID_%%n%% is x ) Here is a routine that returns all non-zero displays off DESKTOPMONITOR - Desktop Monitor management. Note that for multiple monitors, only the first one is returned. WMIC help page global switches The following global switches are available: NAMESPACE - Path for the. I added the brackets just to prove that there are no trailing spaces. It avoids the potential of having trailing space(s) by enclosing the SET statements in parens and collects both values with one query. ) do (set MyScreenHeight=%%A) & (set MyScreenWidth=%%B) & goto:doneĮcho Your resolution is x 'wmic DESKTOPMONITOR get ScreenHeight^,ScreenWidth ^| findstr ""' Here is an approach that suppresses that bothersome extra line, if present (WinXPSP3) off It is not available to query, the height and width values are unknown (blank). This can happen for a system that has had a monitor attached that is currently not available. The problem is probably that WMIC is returning an empty line that is clearing the variables before the FOR is completed.








Desktopmonitor wmic