Showing posts with label WMIC. Show all posts
Showing posts with label WMIC. Show all posts

Sunday, October 09, 2022

Get display resolution from the command line

Get display resolution from the command line

This will get both local resolution and remote desktop screen resolution using WMIC.
c:\>wmic path Win32_VideoController get VideoModeDescription

Sample out below when run on remote desktop session

VideoModeDescription
1024 x 768 x 4294967296 colors
1912 x 989 x 4294967296 colors
Tags: WMIC screen resolution

Wednesday, September 16, 2015

Saturday, August 01, 2015

PowerShell Quick Tips: Rename a computer

Rename local computer to W8M1 and restart
PS D:\> Rename-Computer -NewName W8M1 -Restart
The above command works with Powershell 3.0. For Powershell 2.0, below can be used on an elevated privileges.
PS D:\> $computer = Get-WmiObject Win32_ComputerSystem -ComputerName <old_name>
PS D:\> $computer.Rename("<new_name>")
PS D:\> $os = Get-WmiObject Win32_OperatingSystem
PS D:\> $os.psbase.Scope.Options.EnablePrivileges = $true
PS D:\> $os.Reboot()

Using WMIC to rename a computer
D:\> WMIC ComputerSystem where Name="%computername%" call Rename Name=NewName

References:
http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/c9dcf26a-5476-4199-8311-b101c969a47a/
http://blogs.technet.com/b/askds/archive/2009/02/19/renaming-a-computer-using-wmic-and-how-to-get-around-that-aggravating-invalid-global-switch-error.aspx

Fedora install screen chronicle

Fedora install screen chronicle Below are links to Fedora installation screens. It is interesting to see how it has evolved over time. Fe...