PowerShell scripts for collecting information about computers
Scripts for collecting information about computers
Description | Script |
Collecting information about desktops on the local computer | Get-CimInstance -ClassName Win32_Desktop |
Displaying BIOS information | Get-CimInstance -ClassName Win32_BIOS |
Displaying processor information | Get-CimInstance -ClassName Win32_Processor | Select-Object -ExcludeProperty "CIM*" Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object -Property SystemType |
SystemType ---------- X86-based PC
Description | Script |
Get OEM data | Get-CimInstance -ClassName Win32_ComputerSystem |
List installed hotfixes | Get-CimInstance -ClassName Win32_QuickFixEngineering |
List operating system version information | Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property BuildNumber,BuildType,OSType,ServicePackMajorVersion,ServicePackMinorVersion |
General information about local users |
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property NumberOfLicensedUsers, NumberOfUsers, RegisteredUser Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property *user* |
Get available disk space |
Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DriveType=3" | |
Get logon session information | Get-CimInstance -ClassName Win32_LogonSession |
Display the user logged on to a specific computer system | Get-CimInstance -ClassName Win32_ComputerSystem -Property UserName |
Get the local time from a computer | Get-CimInstance -ClassName Win32_LocalTime |
Display the status of a service |
Get-CimInstance -ClassName Win32_Service | Select-Object -Property Status,Name,DisplayName Get-CimInstance -ClassName Win32_Service | |