📖
mabutou's wiki
  • About
  • 🤖Linux
    • 常规日志ip统计
    • traefik 生成 htpasswd
    • 日志查询
      • 按时间筛选跨行日志
      • 文本搜索 Ripgrep
      • goaccess 解析日志文件
      • ripgrep 筛选指定时间范围日志
    • 根据端口号,找到对应进程
    • Centos 7
      • centos7 安装 MySQL 客户端
    • Ubuntu
      • 清理ubuntu磁盘空间
    • dpkg: warning: files list file for package 'x' missing
    • 转发本地代理到服务器
    • 50 Most Frequently Used UNIX
    • 僵尸进程
    • 查看大文件
    • install xrdp
    • locales error
    • OpenSSH Slow: Hanging at SSH2_MSG_SERVICE_ACCEPT received
    • shell 命令按次数输出v2访问日志的 ip 统计
    • ssh 端口转发脚本
    • shell proxy
    • firewall-cmd
    • mout webdav
    • du 命令
    • Unable to set locale
    • tar分卷压缩与解压缩
    • 合并目录下所有文件内容
    • rsync command
    • journal 日志大小限制
    • add swapfile
    • LVM manage
    • Linux logrotate
    • new user && group
    • Nginx 开启OCSP装订
    • 删除指定时间区间内的文件
    • 群晖初始化
    • ubuntu 内核升级脚本
    • curl 请求带有用户名和密码的 url
  • 🐬Front-end
    • 清理yarn/npm本地缓存
  • ❄️ K8S
    • 批量删除failed pod
    • 镜像批量打标签并推送
    • basic command
    • busybox 解析 pod ip
    • kubectl set node label
    • set pod's image version
    • k8s proxy
    • Force delete POD
  • 🐳Docker
    • 根据进程pid查看该进程所属的容器
    • docker pull 设置下载线程数
    • 查看数据卷目录
    • delete dangling images
    • install docker-compose
    • 按关键词停止容器
    • 限制&&清除容器日志
    • docker images 按大小排序镜像
    • 实时截取日志
    • 查询容器ip
    • 配置镜像加速
    • df 排除 多余文件系统
    • docker copy file from image to host && prune container
  • 🐮Rancher
    • 重置admin 密码
    • 卸载
  • 🐍Python
    • start a simple http_server
  • 🍎Mac
    • MacOS 浏览器播放音频没声音
    • mac 执行sed -i指令时,提示extra characters at the end of command
    • 创建 macOS U盘启动盘
    • Tmux 启动时 127 错误
    • Kill Apple Remote Desktop via ssh
    • hack wechat sqlite
    • 刷新 DNS
    • masscan 端口扫描
    • start apache_server
    • timemachine list and clean
    • dmg || .app 提示文件已损坏
    • 重启 Dock 栏
    • macOS(BSD system) 禁用 ssh 密码登录
  • 🖥️Windows
    • 命令行获取电脑的序列号
    • enable windows ping icmp
    • 关闭休眠模式
    • 卓越性能模式
  • ⌨️ Cheatsheet
    • VIM
    • Bash
    • Git
      • github init
      • Git 变更默认分支名
      • Git 大小写问题
    • Tmux
    • ffmpeg
  • Application
    • chrome 清除 dns && https 缓存
  • 正则表达式
    • basic
    • regular expression
  • Proxmox
    • stop pve
  • VMware
    • 虚拟机设置静态ip, Vmware 虚拟机配置全攻略 - 少数派
  • Hetzner
    • hz 单ip 独服 安装 proxmox 后网卡配置
    • hetzner_box
  • Oracle-Cloud-ARM
    • 修改引导卷大小
  • 镜像源
    • pip 清华源
    • ubuntu 阿里云镜像
    • centos 阿里云镜像
    • npm 淘宝镜像
由 GitBook 提供支持
在本页

这有帮助吗?

  1. Windows

命令行获取电脑的序列号

Windows

wmic bios get serialnumber

Mac OS X

ioreg -l | grep IOPlatformSerialNumber

Linux

sudo dmidecode -t system | grep Serial

补充说明

这条命令可以查到电脑的型号: wmic csproduct get name

或者你也可以这样来查询电脑型号以及序列号 wmic csproduct get identifyingnumber,name

以上命令并不适用于所有的电脑,有时你也可见到这样的返回值:

  • SerialNumber To Be Filled By O.E.M.

  • SerialNumber 0

这些都是因为制造商没有将信息录入正确造成的。

一些 WMIC 查询

Name
Queries

baseboard

get Manufacturer, Model, Name, PartNumber, slotlayout, serialnumber, poweredon

bios

get name, version, serialnumber

bootconfig

get BootDirectory, Caption, TempDirectory, Lastdrive

cdrom

get Name, Drive, Volumename

computersystem

get Name, domain, Manufacturer, Model, NumberofProcessors, PrimaryOwnerName,Username, Roles, totalphysicalmemory /format:list

cpu

get Name, Caption, MaxClockSpeed, DeviceID, Status

datafile

where name=’c:\boot.ini’ get Archive, FileSize, FileType, InstallDate, Readable, Writeable, System, Version

dcomapp

get Name, AppID /format:list

desktop

get Name, ScreenSaverExecutable, ScreenSaverActive, Wallpaper /format:list

desktopmonitor

get screenheight, screenwidth

diskdrive

get Name, Manufacturer, Model, InterfaceType, MediaLoaded, MediaType

diskquota

get User, Warninglimit, DiskSpaceUsed, QuotaVolume

environment

get Description, VariableValue

fsdir

where name=’c:\windows’ get Archive, CreationDate, LastModified, Readable, Writeable, System, Hidden, Status

group

get Caption, InstallDate, LocalAccount, Domain, SID, Status

idecontroller

get Name, Manufacturer, DeviceID, Status

irq

get Name, Status

job

get Name, Owner, DaysOfMonth, DaysOfWeek, ElapsedTime, JobStatus, StartTime, Status

loadorder

get Name, DriverEnabled, GroupOrder, Status

logicaldisk

get Name, Compressed, Description, DriveType, FileSystem, FreeSpace, SupportsDiskQuotas, VolumeDirty, VolumeName

memcache

get Name, BlockSize, Purpose, MaxCacheSize, Status

memlogical

get AvailableVirtualMemory, TotalPageFileSpace, TotalPhysicalMemory, TotalVirtualMemory

memphysical

get Manufacturer, Model, SerialNumber, MaxCapacity, MemoryDevices

netclient

get Caption, Name, Manufacturer, Status

netlogin

get Name, Fullname, ScriptPath, Profile, UserID, NumberOfLogons, PasswordAge, LogonServer, HomeDirectory, PrimaryGroupID

netprotocol

get Caption, Description, GuaranteesSequencing, SupportsBroadcasting, SupportsEncryption, Status

netuse

get Caption, DisplayType, LocalName, Name, ProviderName, Status

nic

get AdapterType, AutoSense, Name, Installed, MACAddress, PNPDeviceID,PowerManagementSupported, Speed, StatusInfo

nicconfig

get MACAddress, DefaultIPGateway, IPAddress, IPSubnet, DNSHostName, DNSDomain

nicconfig

get MACAddress, IPAddress, DHCPEnabled, DHCPLeaseExpires, DHCPLeaseObtained, DHCPServer

nicconfig

get MACAddress, IPAddress, DNSHostName, DNSDomain, DNSDomainSuffixSearchOrder, DNSEnabledForWINSResolution, DNSServerSearchOrder

nicconfig

get MACAddress, IPAddress, WINSPrimaryServer, WINSSecondaryServer, WINSEnableLMHostsLookup, WINSHostLookupFile

ntdomain

get Caption, ClientSiteName, DomainControllerAddress, DomainControllerName, Roles, Status

ntevent

where (LogFile=’system’ and SourceName=’W32Time’) get Message, TimeGenerated

ntevent

where (LogFile=’system’ and SourceName=’W32Time’ and Message like ‘%timesource%’) get Message, TimeGenerated

ntevent

where (LogFile=’system’ and SourceName=’W32Time’ and EventCode!=’29’) get TimeGenerated, EventCode, Message

onboarddevice

get Description, DeviceType, Enabled, Status

os

get Version, Caption, CountryCode, CSName, Description, InstallDate, SerialNumber, ServicePackMajorVersion, WindowsDirectory /format:list

os

get CurrentTimeZone, FreePhysicalMemory, FreeVirtualMemory, LastBootUpTime, NumberofProcesses, NumberofUsers, Organization, RegisteredUser, Status

pagefile

get Caption, CurrentUsage, Status, TempPageFile

pagefileset

get Name, InitialSize, MaximumSize

partition

get Caption, Size, PrimaryPartition, Status, Type

printer

get DeviceID, DriverName, Hidden, Name, PortName, PowerManagementSupported, PrintJobDataType, VerticalResolution, Horizontalresolution

printjob

get Description, Document, ElapsedTime, HostPrintQueue, JobID, JobStatus, Name, Notify, Owner, TimeSubmitted, TotalPages

process

get Caption, CommandLine, Handle, HandleCount, PageFaults, PageFileUsage, PArentProcessId, ProcessId, ThreadCount

product

get Description, InstallDate, Name, Vendor, Version

qfe

get description, FixComments, HotFixID, InstalledBy, InstalledOn, ServicePackInEffect

quotasetting

get Caption, DefaultLimit, Description, DefaultWarningLimit, SettingID, State

recoveros

get AutoReboot, DebugFilePath, WriteDebugInfo, WriteToSystemLog

Registry

get CurrentSize, MaximumSize, ProposedSize, Status

scsicontroller

get Caption, DeviceID, Manufacturer, PNPDeviceID

server

get ErrorsAccessPermissions, ErrorsGrantedAccess, ErrorsLogon, ErrorsSystem, FilesOpen, FileDirectorySearches

service

get Name, Caption, State, ServiceType, StartMode, pathname

share

get name, path, Status

sounddev

get Caption, DeviceID, PNPDeviceID, Manufacturer, Status

startup

get Caption, Location, Command

sysaccount

get Caption, Domain, Name, SID, SIDType, Status

sysdriver

get Caption, Name, PathName, ServiceType, State, Status

systemenclosure

get Caption, Height, Depth, Manufacturer, Model, SMBIOSAssetTag, AudibleAlarm, SecurityStatus, SecurityBreach, PoweredOn, NumberOfPowerCords

systemslot

get Number, SlotDesignation, Status, SupportsHotPlug, Version, CurrentUsage, ConnectorPinout

tapedrive

get Name, Capabilities, Compression, Description, MediaType, NeedsCleaning, Status, StatusInfo

timezone

get Caption, Bias, DaylightBias, DaylightName, StandardName

useraccount

get AccountType, Description, Domain, Disabled, LocalAccount, Lockout, PasswordChangeable, PasswordExpires, PasswordRequired, SID

memorychip

get BankLabel, Capacity, Caption, CreationClassName, DataWidth, Description, Devicelocator, FormFactor, HotSwappable, InstallDate, InterleaveDataDepth, InterleavePosition, Manufacturer, MemoryType, Model, Name, OtherIdentifyingInfo, PartNumber, PositionInRow, PoweredOn, Removable, Replaceable, SerialNumber, SKU, Speed, Status, Tag, TotalWidth, TypeDetail, Version

上一页Windows下一页enable windows ping icmp

最后更新于3年前

这有帮助吗?

🖥️