power shell命令 系统的进程信息、系统的服务信息、系统的磁盘信息、系统的网络适配器信息、系统的网络配置信息、等
# 获取 Windows 激活状态
(Get-WmiObject -Query "SELECT * FROM SoftwareLicensingService").OA3xOriginalProductKey
# 获取 Windows 版本信息
(Get-CimInstance -ClassName Win32_OperatingSystem).Caption
# 获取激活状态信息
(Get-CimInstance -ClassName SoftwareLicensingProduct | Where-Object PartialProductKey).LicenseStatus
# 获取系统类型(32 位或 64 位)
if ([IntPtr]::Size -eq 4) {"32 位"} else {"64 位"}
# 获取 CPU 信息
(Get-CimInstance -ClassName Win32_Processor).Name
# 获取主板信息
(Get-CimInstance -ClassName Win32_BaseBoard).Product
# 获取 BIOS 版本
(Get-CimInstance -ClassName Win32_BIOS).SMBIOSBIOSVersion
# 获取硬盘序列号
(Get-WmiObject -Class "Win32_PhysicalMedia" | Select-Object SerialNumber)[0].SerialNumber
# 获取内存容量
(Get-CimInstance -ClassName Win32_ComputerSystem).TotalPhysicalMemory / 1GB
# 获取网络适配器信息
Get-NetAdapter | Select-Object Name, Speed, MediaType, DriverVersion
# 获取 IP 地址信息
Get-NetIPAddress | Select-Object IPAddress, InterfaceAlias, AddressFamily
# 获取 DNS 服务器信息
Get-DnsClientServerAddress | Select-Object ServerAddresses
# 获取防火墙状态信息
Get-NetFirewallProfile | Select-Object Name, Enabled
# 获取 Windows 更新信息
(Get-CimInstance -ClassName Win32_QuickFixEngineering).InstalledOn
# 获取登录用户信息
Get-WmiObject -Class Win32_ComputerSystem | Select-Object UserName
# 获取最近登录日志信息
Get-WinEvent -LogName "Security"| Where-Object {$_.Id -eq 4624} | Select-Object TimeCreated, Message | Sort-Object TimeCreated -Descending
# 获取开机时间信息
(Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime
# 获取磁盘分区信息
Get-Disk | Select-Object Number, PartitionStyle, Size, OperationalStatus
# 获取进程列表信息
Get-Process | Select-Object Name, Id, CPU, PrivateMemorySize, Description | Sort-Object CPU -Descending | Select-Object -First 10
# 获取网络连接状态信息
Get-NetTCPConnection | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State
# 获取系统服务信息
Get-Service | Select-Object Name, DisplayName, Status, StartType
# 获取计划任务信息
Get-ScheduledTask | Select-Object TaskName, TaskPath, State, NextRunTime, LastRunTime
# 获取用户组信息
Get-LocalGroup | Select-Object Name, Description, GroupScope, Members
# 获取安装的软件列表信息
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Sort-Object DisplayName
# 获取网络配置信息
Get-NetIPConfiguration | Select-Object InterfaceAlias, IPAddress, DefaultIPGateway, DhcpEnabled, DNSServer
# 获取防病毒软件信息
Get-CimInstance -ClassName AntivirusProduct | Select-Object DisplayName, PathToSignedProductExe
# 获取当前登录用户的权限组
(Get-WmiObject -Class Win32_GroupUser | Where-Object {$_.PartComponent -match "$env:USERNAME"}).GroupComponent | foreach {
$groupName = $_.Substring($_.IndexOf("=")+1).Trim('"')
Get-WmiObject -Class Win32_Group -Filter "Name='$groupName'" | Select-Object Name, Description, Domain
}
# 获取所有用户账户信息
Get-LocalUser | Select-Object Name, FullName, Description, Enabled
# 获取网络接口信息
Get-NetAdapter | Select-Object Name, InterfaceDescription, MacAddress, LinkSpeed, Status
# 获取已安装的打印机信息
Get-Printer | Select-Object Name, DriverName, PortName, Shared
# 获取系统环境变量信息
Get-ChildItem Env:
# 获取正在运行的服务信息
Get-Service | Where-Object {$_.Status -eq "Running"} | Select-Object Name, DisplayName, Status
# 获取系统事件日志信息
Get-WinEvent -LogName System | Select-Object TimeCreated, LevelDisplayName, Id, Message | Sort-Object TimeCreated -Descending | Select-Object -First 10
# 获取硬盘驱动器信息
Get-PhysicalDisk | Select-Object DeviceID, MediaType, Size, Manufacturer, Model
# 获取注册表项信息
Get-ChildItem -Path "HKLM:\Software\Microsoft\" -Recurse | Select-Object PSPath, PSParentPath, PSChildName
# 获取已安装的 Windows 更新信息
Get-WmiObject -Class Win32_QuickFixEngineering | Select-Object HotFixID, InstalledOn
# 获取系统日志文件信息
Get-WmiObject -Class Win32_NTEventLogFile | Select-Object LogFileName, NumberOfRecords, FileSize, OverWritePolicy
# 获取正在运行的进程数量
(Get-Process).Count
# 获取计算机的域信息
Get-WmiObject -Class Win32_ComputerSystem | Select-Object Domain, DomainRole, PartOfDomain
# 获取系统版本信息
Get-WmiObject -Class Win32_OperatingSystem | Select-Object Caption, Version, BuildNumber
# 获取网络适配器配置信息
Get-NetAdapterConfiguration | Select-Object InterfaceAlias, IPAddress, DefaultIPGateway, DhcpEnabled, DNSServerSearchOrder
# 获取已安装的软件包信息
Get-Package | Select-Object Name, Version, Publisher, InstalledDate
# 获取本地用户组成员信息
Get-LocalGroupMember -Group "Administrators" | Select-Object Name, PrincipalSource
# 获取防火墙规则信息
Get-NetFirewallRule | Select-Object Name, DisplayName, Description, Action
# 获取正在运行的服务详细信息
Get-WmiObject -Class Win32_Service | Select-Object Name, DisplayName, StartMode, State, PathName
# 获取系统驱动信息
Get-WmiObject -Class Win32_PnPSignedDriver | Select-Object DeviceName, Manufacturer, DriverVersion, DriverDate
# 获取系统进程的 CPU 和内存使用情况
Get-Process | Sort-Object CPU -Descending | Select-Object Name, Id, CPU, WorkingSet
# 获取可用的磁盘空间信息
Get-PSDrive | Where-Object {$_.Free -gt 0} | Select-Object Name, Used, Free, Provider
# 获取系统运行时间
$uptime = (Get-Date) - (Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime
Write-Output "系统已运行: $($uptime.Days) 天, $($uptime.Hours) 小时, $($uptime.Minutes) 分钟, $($uptime.Seconds) 秒"
# 获取正在监听的网络端口信息
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort
# 获取系统电源计划信息
powercfg /list
# 获取当前网络连接信息
Get-NetConnectionProfile | Select-Object Name, InterfaceAlias, IPv4Connectivity, IPv6Connectivity
# 获取已安装的程序集信息
Get-GacAssembly | Select-Object Name, Version, PublicKeyToken
# 获取正在运行的进程详细信息
Get-WmiObject -Class Win32_Process | Select-Object Name, ProcessId, CommandLine, CreationDate
# 获取系统日期和时间
Get-Date
# 获取磁盘分区信息
Get-WmiObject -Class Win32_LogicalDisk | Select-Object DeviceID, VolumeName, Size, FreeSpace
# 获取系统内存信息
Get-WmiObject -Class Win32_ComputerSystem | Select-Object TotalPhysicalMemory, Manufacturer, Model
# 获取系统BIOS信息
Get-WmiObject -Class Win32_BIOS | Select-Object Manufacturer, Version, SerialNumber
# 获取正在连接的网络会话信息
Get-NetSession | Select-Object UserName, ComputerName, ClientType, ConnectionState
# 获取计算机的时区信息
Get-TimeZone
# 获取系统默认浏览器信息
$browser = (Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice').ProgId
$browserPath = Get-Command $browser | Select-Object -ExpandProperty Source
Write-Output "默认浏览器: $browserPath"
# 获取系统最近登录的用户信息
Get-WinEvent -FilterHashtable @{Logname='Security';ID=4624} | Select-Object TimeCreated, Message -First 10
# 获取系统的网络配置信息
Get-NetIPConfiguration | Select-Object InterfaceAlias, InterfaceDescription, IPv4Address, DefaultGateway, DNSServer
# 获取系统的音频设备信息
Get-WmiObject -Class Win32_SoundDevice | Select-Object Name, Manufacturer, Status
# 获取系统的显示器信息
Get-WmiObject -Namespace "root\wmi" -Class WmiMonitorBasicDisplayParams | Select-Object InstanceName, MaxHorizontalImageSize, MaxVerticalImageSize
# 获取系统的电池信息(仅适用于笔记本电脑)
Get-WmiObject -Class Win32_Battery | Select-Object EstimatedChargeRemaining, BatteryStatus, DesignCapacity, FullChargeCapacity
# 获取系统的热键设置
Get-WmiObject -Namespace "root\CIMV2" -Class Win32_KeyboardShortcut | Select-Object Description, KeyCombination
# 获取系统的默认打印机
Get-WmiObject -Query "SELECT * FROM Win32_Printer WHERE Default=$true" | Select-Object Name
# 获取系统环境变量信息
Get-ChildItem -Path Env:
# 获取系统启动项信息
Get-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" | Select-Object Property, Item
# 获取系统计划任务信息
Get-ScheduledTask | Select-Object TaskName, TaskPath, State
# 获取系统驱动程序信息
Get-WmiObject -Class Win32_SystemDriver | Select-Object Name, State, StartMode, PathName
# 获取系统的 COM 组件信息
Get-CimInstance -ClassName Win32_ClassicCOMClass | Select-Object ComponentID, Description
# 获取系统的 UAC 配置信息
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name ConsentPromptBehaviorAdmin
# 获取系统的用户帐户信息
Get-LocalUser | Select-Object Name, Description, AccountType, Enabled
# 获取系统的 SMB 共享信息
Get-SmbShare | Select-Object Name, Path, Description, CachingMode
# 获取系统的安装驱动程序信息
Get-WmiObject -Class Win32_PnPSignedDriver | Select-Object DeviceName, Manufacturer, DriverVersion, DriverDate
# 获取系统的 CPU 信息
Get-WmiObject -Class Win32_Processor | Select-Object Name, NumberOfCores, ProcessorId, Architecture
# 获取系统的磁盘信息
Get-PhysicalDisk | Select-Object MediaType, Model, SerialNumber, Size, FirmwareVersion
# 获取系统的磁盘缓存信息
Get-PhysicalDisk | Get-PhysicalDisk | Select-Object MediaType, Model, SerialNumber, Size, FirmwareVersion
# 获取系统的网络适配器信息
Get-NetAdapter | Select-Object Name, InterfaceDescription, LinkSpeed, MacAddress
# 获取系统的 IIS 配置信息
Get-WebConfiguration -Filter "/system.webServer/security/authentication/windowsAuthentication" | Select-Object enabled, useKernelMode
# 获取系统的 COM+ 应用程序信息
Get-CimInstance -ClassName Win32_COMApplication | Select-Object Name, Description, InstallDate
# 获取系统的虚拟内存信息
Get-CimInstance -ClassName Win32_PageFileUsage | Select-Object Name, AllocatedBaseSize, CurrentUsage
# 获取系统的启动顺序信息
Get-WmiObject -Class Win32_BootConfiguration | Select-Object BootDirectory, ConfigurationPath, OsDevice
# 获取系统的 SMB 会话信息
Get-SmbSession | Select-Object ClientComputerName, ConnectedTime, ShareName, UserName
# 获取系统服务信息
Get-Service
# 获取系统进程信息
Get-Process
# 获取系统事件日志信息
Get-EventLog -LogName Application
# 获取系统磁盘空间信息
Get-PSDrive | Where-Object {$_.Free -gt 0} | Select-Object Name, Used, Free
# 获取系统网络连接信息
Get-NetTCPConnection
# 获取系统网络适配器配置信息
Get-NetAdapterConfiguration
# 获取系统防火墙规则信息
Get-NetFirewallRule
# 获取系统日期和时间信息
Get-Date
# 设置系统日期和时间
Set-Date -Date "2022-01-01"
# 获取系统版本信息
[System.Environment]::OSVersion.Version
# 获取系统安装的程序信息
Get-WmiObject -Class Win32_Product | Select-Object Name, Vendor, Version
# 获取系统的补丁信息
Get-Hotfix
# 获取系统的计算机名
$env:COMPUTERNAME
# 获取系统的域名
$env:USERDOMAIN
# 获取系统的默认打印机信息
Get-Printer | Where-Object {$_.Default -eq $true}
# 获取系统的电源计划信息
Get-PowerPlan
# 获取系统的屏幕分辨率信息
Get-WmiObject -Namespace root\wmi -Class WmiMonitorBasicDisplayParams | Select-Object MaxHorizontalImageSize, MaxVerticalImageSize
# 获取系统的音量信息
Get-AudioDevice
# 获取系统的注册表信息
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
# 获取系统的网络配置信息
Get-NetIPConfiguration
# 设置系统主机名
Rename-Computer -NewName "NewComputerName"
# 获取系统的 DNS 信息
Get-DNSClientServerAddress
# 获取系统的 DHCP 信息
Get-NetAdapter | Select-Object Name, DHCP
# 获取系统的路由表信息
Get-NetRoute
# 获取系统的网络策略信息
Get-NetIPsecRule
# 获取系统的组策略信息
Get-GPO -All
# 获取系统的本地安全策略信息
secedit /export /areas SECURITYPOLICY /cfg C:\LocalPolicy.inf
# 获取系统的远程桌面配置信息
Get-RDSessionHostConfiguration
# 获取系统的网络共享信息
Get-SmbShareAccess
# 获取系统的文件权限信息
Get-Acl
# 获取系统的事件订阅器信息
Get-WinEvent -ListLog *
# 获取系统的注册表权限信息
Get-Acl -Path "HKLM:\SOFTWARE\Microsoft"
# 获取系统的用户组信息
Get-LocalGroup | Select-Object Name, Description, GroupType
# 获取系统的计划任务 XML 配置
Export-ScheduledTask -TaskName "MyTask" -TaskPath "\MyTasks" -Xml
# 获取系统的 COM+ 应用程序配置信息
Get-CimInstance -Namespace root\cimv2\Applications -ClassName Win32_COMSetting | Select-Object Description, SettingID
# 获取系统的 IIS 站点信息
Get-Website | Select-Object Name, ID, State, Bindings
# 获取系统的 SMTP 服务信息
Get-Service -Name SMTPSVC
# 获取系统的 WMI 信息
Get-WmiObject -Query "SELECT * FROM Win32_ComputerSystem" | Select-Object Name, Domain, Manufacturer
# 获取系统的 CPU 温度信息
Get-CimInstance -Namespace root\wmi -ClassName MSAcpi_ThermalZoneTemperature | Select-Object CurrentTemperature
# 获取系统的硬件设备信息
Get-PnpDevice
# 获取系统的 USB 设备信息
Get-WMIObject -Class Win32_USBControllerDevice | ForEach-Object { [wmi]($_.Antecedent -replace "win32_", "Win32_") } | Select-Object Manufacturer, Description, DeviceID
# 获取系统的 CPU 信息
Get-WmiObject -Class Win32_Processor | Select-Object Name, Manufacturer, NumberOfCores, MaxClockSpeed
# 获取系统的内存信息
Get-WmiObject -Class Win32_PhysicalMemory | Select-Object Manufacturer, Capacity, Speed
# 获取系统的磁盘驱动器信息
Get-PhysicalDisk | Select-Object DeviceID, MediaType, Size
# 获取系统的分区和卷信息
Get-Partition | Select-Object DiskNumber, PartitionNumber, Size, Type
# 获取系统的文件系统信息
Get-Volume | Select-Object DriveLetter, FileSystemLabel, FileSystem, Size, FreeSpace
# 获取系统的网络适配器信息
Get-NetAdapter | Select-Object Name, InterfaceDescription, Status, MacAddress
# 获取系统的网络配置信息
Get-NetIPAddress | Select-Object IPAddress, InterfaceAlias, InterfaceIndex
# 获取系统的路由器信息
Get-NetRoute | Select-Object DestinationPrefix, NextHop, RouteMetric, InterfaceAlias
# 获取系统的防火墙规则信息
Get-NetFirewallRule | Select-Object DisplayName, Profile, Action, Direction
# 获取系统的计划任务信息
Get-ScheduledTask | Select-Object TaskName, TaskPath, State, Triggers
# 获取系统的服务状态信息
Get-Service | Select-Object Name, DisplayName, Status
# 获取系统的事件日志信息
Get-EventLog -LogName Application, System -Newest 10
# 获取系统的注册表键值信息
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | Select-Object -Property *
# 获取系统的环境变量信息
Get-ChildItem Env:
# 获取系统的进程详细信息
Get-Process | Select-Object Name, ID, CPU, Memory
# 获取系统的用户会话信息
Get-LoggedOnUser | Select-Object UserName, SessionType, LogonTime
# 获取系统的打印机信息
Get-Printer | Select-Object Name, DriverName, PortName, Shared
# 获取系统的默认浏览器信息
Get-DefaultBrowser
# 获取当前用户的登录名
$env:USERNAME
# 获取当前用户所属的组信息
Get-LocalGroupMember -Member $env:USERNAME
# 获取系统的组件信息
Get-WindowsOptionalFeature -Online | Select-Object FeatureName, State
# 获取系统的安装程序列表
Get-Package | Select-Object Name, Version
# 获取系统的更新列表
Get-Hotfix | Select-Object HotFixID, InstalledOn
# 获取系统的安全日志信息
Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4624} -MaxEvents 10 | Select-Object TimeCreated, Message
# 获取系统的远程桌面会话信息
Get-RDUserSession | Select-Object UserName, HostServer, ConnectionState
# 获取系统的系统信息
Get-ComputerInfo | Select-Object WindowsProductName, WindowsEditionId, WindowsInstallationType, WindowsInstallationDate
# 获取系统的电源计划信息
Get-PowerPlan | Select-Object Name, Description, IsActive
# 获取系统的网络适配器驱动程序信息
Get-NetAdapter | Get-NetAdapterDriver | Select-Object InterfaceDescription, DriverVersion
# 获取系统的本地用户信息
Get-LocalUser | Select-Object Name, Enabled, LastLogon, PasswordExpires
# 获取系统的远程桌面会话主机信息
Get-RDRemoteApp | Select-Object Alias, DisplayName, FilePath, CommandLineArguments
# 获取系统的安全中心信息
Get-CimInstance -Namespace root\SecurityCenter2 -ClassName AntiVirusProduct
# 获取系统的计算机账户密码过期信息
Get-ADComputer -Identity $env:COMPUTERNAME -Properties PasswordLastSet, PasswordNeverExpires | Select-Object Name, PasswordLastSet, PasswordNeverExpires
# 获取系统的 COM+ 应用程序信息
Get-CimInstance -Namespace root\cimv2\Applications -ClassName Win32_COMSetting | Select-Object Description, SettingID
# 获取系统的 IIS 应用程序池信息
Get-ChildItem IIS:\AppPools | Select-Object Name, ManagedRuntimeVersion, State
# 获取系统的 SMTP 服务器日志信息
Get-MessageTrackingLog -Server <servername> -Start "02/01/2024 00:00:00" -End "02/01/2024 23:59:59" -EventId RECEIVE | Select-Object Timestamp, Source, Sender, Recipients
# 获取系统的 DHCP 客户端配置信息
Get-NetIPConfiguration | Where-Object { $_.DHCP } | Select-Object InterfaceAlias, DhcpEnabled, DNSServer
# 获取系统的网络共享权限信息
Get-SmbShareAccess | Select-Object Name, AccountName, AccessRight
# 获取系统的 UAC 配置信息
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA | Select-Object EnableLUA
# 获取系统的进程信息
Get-Process | Select-Object Name, CPU, Description, Path
# 获取系统的服务信息
Get-Service | Select-Object Name, DisplayName, Status, StartType
# 获取系统的磁盘信息
Get-PhysicalDisk | Select-Object MediaType, Size, Manufacturer, Model
# 获取系统的网络适配器信息
Get-NetAdapter | Select-Object Name, InterfaceDescription, Status, Speed
# 获取系统的网络配置信息
Get-NetIPAddress | Select-Object IPAddress, InterfaceAlias, InterfaceIndex, AddressFamily
# 获取系统的防火墙规则信息
Get-NetFirewallRule | Select-Object Name, DisplayName, Action, Enabled
# 获取系统的注册表信息
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, UninstallString
# 获取系统的事件日志信息
Get-EventLog -LogName Application -After (Get-Date).AddDays(-7) | Select-Object TimeGenerated, Source, Message
# 获取系统的端口监听信息
Get-NetTCPConnection -State Listen | Where-Object { $_.OwningProcess -ne 0 } | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State, OwningProcess
# 获取系统的计划任务信息
Get-ScheduledTask | Select-Object TaskName, TaskPath, State, LastRunTime, NextRunTime
# 获取系统的打印机信息
Get-Printer | Select-Object Name, PrinterStatus, DriverName, PortName
# 获取系统的磁盘卷信息
Get-Volume | Select-Object DriveLetter, FileSystemLabel, FileSystem, Size, FreeSpace
# 获取系统的网络连接信息
Get-NetTCPConnection | Where-Object { $_.State -eq "Established" } | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State, CreationTime
# 获取系统的 COM+ 应用程序池信息
Get-CimInstance -Namespace root\cimv2\Applications -ClassName Win32_COMApplicationPool | Select-Object Name, IsEnabled, Status
# 获取系统的 IIS 网站信息
Get-ChildItem IIS:\Sites | Select-Object Name, PhysicalPath, State, ApplicationPool
# 获取系统的 SMTP 服务器配置信息
Get-TransportConfig | Select-Object TLSSendDomainSecureList, TLSSendConnectorSecureList, TLSReceiveDomainSecureList, TLSReceiveConnectorSecureList
# 获取系统的 DHCP 服务器配置信息
Get-DhcpServerSetting | Select-Object DnsServerIPAddress, Router, DomainName
# 获取系统的 DNS 服务器配置信息
Get-DnsClientServerAddress | Select-Object InterfaceAlias, ServerAddresses
# 获取系统的本地组策略配置信息
Get-GPResultantSetOfPolicy -ReportType HTML -Path $env:USERPROFILE\Desktop\GPOReport.html
# 获取系统的 UEFI/BIOS 信息
Get-WmiObject -Namespace root\cimv2 -Class Win32_BIOS | Select-Object Manufacturer, SMBIOSBIOSVersion, BIOSVersion
# 获取系统的磁盘分区信息
Get-Partition | Select-Object DiskNumber, PartitionNumber, Size, Type, DriveLetter
# 获取系统的网络负载均衡配置信息
Get-NlbClusterNode | Select-Object HostName, InterfaceName, DedicatedIPAddress, CurrentState
# 获取系统的共享文件夹信息
Get-SmbShare | Select-Object Name, Path, Description, CachingMode
获取系统的安装软件信息:
powershell
Get-WmiObject -Class Win32_Product | Select-Object Name, Version, Vendor
获取系统的用户账户信息:
powershell
Get-LocalUser | Select-Object Name, Description, LastLogon, Enabled
获取系统的组信息:
powershell
Get-LocalGroup | Select-Object Name, Description, Members
获取系统的热更新信息:
powershell
Get-HotFix | Select-Object HotFixID, Description, InstalledBy, InstalledOn
获取系统的事件订阅器信息:
powershell
Get-WinEventSubscriber | Select-Object Name, EventID, LogName, Action
获取系统的注册表项信息:
powershell
Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" | Select-Object ProductName, ReleaseId, InstallDate
获取系统的本地安全策略信息:
powershell
Get-SecurityPolicy | Select-Object Name, Value
获取系统的远程桌面服务配置信息:
powershell
Get-RDSessionCollectionConfiguration | Select-Object CollectionName, SecurityDescriptor, UserGroups
获取系统的网络共享信息:
powershell
Get-SmbShare | Select-Object Name, Path, Description, ShareType
获取系统的 CPU 信息:
powershell
Get-WmiObject -Class Win32_Processor | Select-Object Name, Manufacturer, MaxClockSpeed, NumberOfCores
获取系统的计算机名和域名:
powershell
Get-WmiObject -Class Win32_ComputerSystem | Select-Object Name, Domain
获取系统的硬件信息:
powershell
Get-WmiObject -Class Win32_BaseBoard | Select-Object Manufacturer, Product, SerialNumber
Get-WmiObject -Class Win32_Battery | Select-Object DeviceID, EstimatedChargeRemaining, Status
Get-WmiObject -Class Win32_OperatingSystem | Select-Object Caption, OSArchitecture, Version
Get-WmiObject -Class Win32_PhysicalMemory | Select-Object BankLabel, Capacity, Speed
获取系统的网络配置信息:
powershell
Get-DnsClientServerAddress | Select-Object InterfaceAlias, ServerAddresses
Get-NetIPAddress | Select-Object IPAddress, InterfaceAlias, AddressFamily
Get-NetRoute | Select-Object DestinationPrefix, RouteMetric, NextHop, InterfaceAlias
获取系统的存储配置信息:
powershell
Get-PhysicalDisk | Select-Object MediaType, Size, Manufacturer, Model
Get-Volume | Select-Object DriveLetter, FileSystemLabel, FileSystem, Size, FreeSpace
Get-VirtualDisk | Select-Object Name, HealthStatus, LogicalSectorSize, PhysicalDiskRedundancy
获取系统的安全配置信息:
powershell
Get-Acl C:\Windows\System32\ | Format-List Owner, Group, AccessToString
Get-LocalGroupPolicy | Select-Object Enabled, SecurityOptions, AuditPolicy
获取系统的远程桌面配置信息:
powershell
Get-RDSessionHost | Select-Object Name, BrokerServer, FarmName, SessionLimit
Get-RDRemoteApp | Select-Object Alias, DisplayName, FilePath, CommandLineSetting
获取系统的打印机配置信息:
powershell
Get-PrinterPort | Select-Object Name, HostAddress, PortNumber
Get-PrinterDriver | Select-Object Name, DriverType, MajorVersion, Manufacturer
Get-Printer | Select-Object Name, PrinterStatus, DriverName, PortName
获取系统的 Windows 更新信息:
powershell
Get-WindowsUpdate | Select-Object Title, Description, Downloaded, Installed
Get-HotFix | Select-Object HotFixID, InstalledOn, Description