Saturday, April 16, 2011

Which programs are being executed at system startup with a query? Easy to do.

Easy to do:

select Caption,Command,Location,User FROM Win32_StartupCommand where command <> 'desktop.ini'
Results:

Full device screen information with a simple query?

Easy to do:

select AdapterCompatibility,AdapterRAM,Availability,Caption,CurrentBitsPerPixel,CurrentHorizontalResolution,CurrentNumberOfColors,CurrentRefreshRate,CurrentScanMode,CurrentVerticalResolution,DeviceID,DeviceSpecificPens,DriverVersion,InfFilename,InfSection,InstalledDisplayDrivers,MaxRefreshRate,MinRefreshRate,Monochrome,NumberOfColorPlanes,PNPDeviceID,VideoArchitecture,VideoMemoryType,VideoModeDescription,VideoProcessor FROM Win32_VideoController

Results:

All USB Controllers with a query?

Easy to do:

select Caption,DeviceID,Manufacturer,ProtocolSupported FROM Win32_USBController
Results:

Tape drive information with a query?

Easy to do:

select Availability,Capabilities,Caption,Compression,DefaultBlockSize,DeviceID,Manufacturer,MaxBlockSize,MaxMediaSize,MaxPartitionCount,MediaType,MinBlockSize,NeedsCleaning,NumberOfMediaSupported,Padding FROM Win32_TapeDrive

Sound devices information WMI Query?

Easy to do:

select Caption,DeviceID,Manufacturer FROM Win32_SoundDevice

Results:

Serial port information for all devices?

Easy to do:

select Availability,Binary,Caption,DeviceID,MaxBaudRate,MaximumInputBufferSize,MaximumOutputBufferSize,OSAutoDiscovered,PNPDeviceID,ProviderType FROM Win32_SerialPort

Results:

SCSI controllers information?

Easy to do:

select Availability,Caption,DeviceID,DriverName,Manufacturer,ProtocolSupported FROM Win32_SCSIController

Results

Want to get the hot fixes information? Easy to do.

Easy to do:

select Description,FixComments,HotFixID,InstalledBy,InstalledOn,ServicePackInEffect FROM Win32_QuickFixEngineering

Results:

Modem Information with a single query?

Easy to do:

select AttachedTo,Caption,CountrySelected,DeviceID,DeviceType,MaxBaudRateToPhone,MaxBaudRateToSerialPort,ModemInfPath,ModemInfSection,ProviderName FROM Win32_POTSModem
Results:

Port connector information with a query?

Easy to do:

select ConnectorType,ExternalReferenceDesignator,InternalReferenceDesignator,PortType FROM Win32_PortConnector
Results:

Portable battery info with a query?

Easy to do:

select CapacityMultiplier,Chemistry,DesignCapacity,DesignVoltage,DeviceID,Location,ManufactureDate,Manufacturer,MaxBatteryError,Name,SmartBatteryVersion FROM Win32_PortableBattery

Pointing devices info with a query? Easy.

Easy to do:

select Caption,DeviceID,DeviceInterface,DoubleSpeedThreshold,Handedness,InfFileName,InfSection,Manufacturer,NumberOfButtons,PointingType,QuadSpeedThreshold FROM Win32_PointingDevice
Result:

Info about PCIMA controllers?

Easy to do:

select Caption,ConfigManagerErrorCode,ConfigManagerUserConfig,DeviceID,Manufacturer,ProtocolSupported FROM Win32_PCMCIAController

Parallel port information?

Easy to do:

select Availability,Caption,ConfigManagerErrorCode,ConfigManagerUserConfig,OSAutoDiscovered,PNPDeviceID,PowerManagementSupported,ProtocolSupported FROM Win32_ParallelPort
Results:

Page file size full information? Easy to do.

Easy to do:

select Archive,Caption,CreationDate,FileSize,Hidden,InitialSize,InstallDate,MaximumSize,Path,Readable,System,Writeable FROM Win32_PageFile
Results:

Want to get the directory of debugging dump files? easy

Easy to do:

select AutoReboot,DebugFilePath,DebugInfoType,KernelDumpOnly,MiniDumpDirectory,OverwriteExistingDebugFile,SendAdminAlert,WriteDebugInfo,WriteToSystemLog FROM Win32_OSRecoveryConfiguration
Results:

Embedded onboard devices info? easy to do

Easy to do:

select Description,DeviceType,Enabled,Tag FROM Win32_OnBoardDevice
Results:

Network client information with a query?

Easy to do:

select Caption,Description,Manufacturer,Name FROM Win32_NetworkClient

Results:

Keyboard info? just a WMI query

Easy to do:

select ConfigManagerErrorCode,ConfigManagerUserConfig,Description,DeviceID,Layout,NumberOfFunctionKeys FROM Win32_Keyboard

Get info about infrarred devices with a query? easy

Easy to do:

select Availability,Caption,ConfigManagerErrorCode,ConfigManagerUserConfig,DeviceID,Manufacturer,ProtocolSupported FROM Win32_InfraredDevice

Do you want to get ID Controllers? Easy

Easy to do:

select Caption,DeviceID,Manufacturer,ProtocolSupported FROM Win32_IDEController

Results:

Do you want to get display configurations? Easy to do

Easy to do:

select BitsPerPel,Caption,DisplayFlags,DisplayFrequency,DriverVersion,LogPixels,PelsHeight,PelsWidth,SpecificationVersion FROM Win32_DisplayConfiguration

Results:

Partition properties query? Easy to do.

Easy to do:

select BlockSize,Bootable,BootPartition,DeviceID,DiskIndex,Index,NumberOfBlocks,PrimaryPartition,Size,StartingOffset,Type FROM Win32_DiskPartition
Results:

Screen properties query? Easy to do

Easy to do:

select Availability,Caption,DeviceID,MonitorManufacturer,PixelsPerXLogicalInch,PixelsPerYLogicalInch,PNPDeviceID,ScreenHeight,ScreenWidth FROM Win32_DesktopMonitor
Results:

Desktop properties Query? Easy to do.

Easy to do:

select BorderWidth,CoolSwitch,CursorBlinkRate,DragFullWindows,GridGranularity,IconSpacing,IconTitleFaceName,IconTitleSize,IconTitleWrap,Name,Pattern,ScreenSaverActive,ScreenSaverExecutable,ScreenSaverSecure,ScreenSaverTimeout,Wallpaper,WallpaperStretched,WallpaperTiled FROM Win32_Desktop

Results:

System Vendor with a Single Query? Easy

Easy to do:

select IdentifyingNumber,Name,UUID,Vendor,Version FROM Win32_ComputerSystemProduct
Results:

Bus information with a single query? Easy to do

Easy to do:

select BusNum,BusType,DeviceID,PNPDeviceID FROM Win32_Bus

Results:

Want to get the OS temp directories?

Easy to do:

select BootDirectory,Caption,ConfigurationPath,ScratchDirectory,TempDirectory FROM Win32_BootConfiguration
Results:

Bios Information with a query? easy to do.

Easy to do:
select BiosCharacteristics,BIOSVersion,Caption,CurrentLanguage,InstallableLanguages,Manufacturer,PrimaryBIOS,ReleaseDate,SerialNumber,SMBIOSBIOSVersion,SMBIOSMajorVersion,SMBIOSMinorVersion,SMBIOSPresent,Status,Version FROM Win32_Bios
Results:

Battery Power Information with a query? Easy to do

Easy to do:

select Availability,BatteryStatus,Chemistry,DesignCapacity,DeviceID,Name,PowerManagementCapabilities,PowerManagementSupported,SmartBatteryVersion,Status FROM Win32_Battery
Results (Empty because I do not have battery :) ):

Physical information about the motherboard? Easy to do.

Easy to do:

select ConfigOptions,HostingBoard,Manufacturer,PoweredOn,Product,SerialNumber,Version FROM Win32_BaseBoard
Results:

Physical disk information with a single query? lets do it

Easy to do:

select bytespersector,Description,InterfaceType,Manufacturer,Model,Name,Partitions,PNPDeviceID,Sectorspertrack,Size,Totalcylinders,Totalheads,Totalsectors,Totaltracks,TracksperCylinder FROM Win32_DiskDrive
Results:

get info about OS Groups or roles? Easy to do

Easy to do:

SELECT Caption,Description,LocalAccount,Name,SID from Win32_Group where domain = 'DESKTOP'

Results:

Accounts information with a simple query? Easy to do

Easy to do:

SELECT Accounttype,Caption,Description,Disabled,Fullname,LocalAccount,Lockout,Name,PasswordChangeable,PasswordExpires,PasswordRequired,SID,SIDType,Status from Win32_UserAccount where domain = 'DESKTOP'
Results:

Services information with a query? easy to do.

Easy to do:

select Acceptpause,Acceptstop,Caption,Desktopinteract,Name,Pathname,Started,Startmode,Startname,State from Win32_Service

Results:

Full disk information with a query? lets do this

Easy to do:

select Caption,Compressed,Description,DriveType,FileSystem,Freespace,Size,Volumename,Volumeserialnumber FROM Win32_LogicalDisk
Results:

Full Network Adapter information with a Query? Easy

Easy to do:
select Databasepath,DefaultIPGateway,Description,DHCPenabled,DHCPserver,DNSDomain,DNSDomainSuffixSearchOrder,DNSEnabledForWinsResolution,DNSHostname,DNSServerSearchOrder,DomainDNSRegistrationEnabled,FullDNSRegistrationEnabled,GatewayCostMetric,IPAddress,IPConnectionMetric,IPEnabled,IPFiltersecurityEnabled,IPPortSecurityEnabled,IPSecPermitIPProtocols,IPSecPermitTCPPorts,IPSubnet,MACaddress,ServiceName,SettingID,TcpipNetbiosOptions,WINSEnableLMHostsLookup,WINSPrimaryserver,WINSScopeID,WINSSecondaryserver from Win32_NetworkAdapterConfiguration

Results:

Printer information with a WMI Query? Easy.

Easy to do:
select Capabilitydescriptions,Caption,Comment,EnableBIDI,Horizontalresolution,Local,Location,Network,Portname,Printjobdatatype,Printprocessor,Sharename,Status,verticalresolution FROM Win32_Printer

Results:

Network shares with a query?

Easy to do:

select Caption,Name,Path,Type FROM Win32_Share

Results:

Physical memory information required? just a WQL

Easy to do:

select BankLabel,Capacity,DataWidth,DeviceLocator,FormFactor,InterleaveDataDepth,InterleavePosition,MemoryType,PositionInRow,Speed,Tag,TotalWidth,TypeDetail FROM Win32_PhysicalMemory
Results:

How to get Full OS information ? WQL Query

Easy to do:

SELECT Bootdevice,BuildNumber,BuildType,Caption,Codeset,Countrycode,CSDVersion,Currenttimezone,DataExecutionPrevention_32BitApplications,DataExecutionPrevention_Available,DataExecutionPrevention_Drivers,DataExecutionPrevention_Supportpolicy,Debug,Description,EncryptionLevel,ForegroundApplicationBoost,InstallDate,LargeSystemCache,MaxProcessMemorySize,NumberOfLicensedUsers,Organization,OSLanguage,OSProductSuite,OSType,OtherTypeDescription,PlusProductID,PlusVersionNumber,ProductType,RegisteredUser,SerialNumber,ServicePackMajorVersion,ServicePackMinorVersion,SizeStoredInPagingFiles,Status,Suitemask,SystemDevice,SystemDirectory,SystemDrive,TotalVirtualMemorysize,TotalVisibleMemorySize,Version,WindowsDirectory FROM Win32_OperatingSystem
Results:

Friday, April 15, 2011

Do you want to get All environment variables with a Query? EASY.

SELECT Name, VariableValue, UserName FROM Win32_Environment

A Query for System Drivers Installed? Easy

SELECT Name, Description, PathName, ServiceType, Started, StartMode, State, Status, ErrorControl, AcceptPause, AcceptStop FROM Win32_SystemDriver

A query for CD ROM drives information required? Easy

SELECT Drive, Description, MediaLoaded, MediaType, Name, Manufacturer, Status, TransferRate, SCSITargetId, PNPDeviceID FROM Win32_CDRomDrive

Bios Features query needed? Easy.

SELECT Manufacturer, Version, SMBIOSPresent, SMBIOSBIOSVersion, ReleaseDate, SMBIOSMajorVersion, SMBIOSMinorVersion, BIOSVersion FROM Win32_BIOS

CPU features query needed? Easy

SELECT Name,MaxClockSpeed,NumberOfCores,NumberOfLogicalProcessors FROM Win32_Processor

a PC Features Query needed ? Easy.

SELECT Name, Manufacturer, Model, SystemType, UserName, DaylightInEffect FROM Win32_ComputerSystem

Query to get the OS Properties?

SELECT * FROM Win32_OperatingSystem