Sunday, 15 July 2012

PowerShell Commands


PowerShell commands to obtain critical system information

·       Determine screen resolution

When a software package requires a certain resolution or minimum resolution, you can query the local computer to return the resolution of the primary monitor. Multiple monitors are not supported in this command.

Get-DisplaySetting

Couple the command with a variable to determine the computer’s name and export it to a local (or central file):

               $NetBIOSName = gc env:computername
               Get-DisplaySetting > C:\$NetBIOSName.txt

·      Enumerate USB devices

Get-USB -Computername System.FullyQualified.Domain
you can run this command against remote systems natively. Running the command with the -computername variable will connect the command to a remote system and return the same results as if it were executing locally.

·   Processor information

Get-processor

Cheers :)

No comments:

Post a Comment