前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >windows超级命令行wmic

windows超级命令行wmic

原创
作者头像
Windows技术交流
修改2022-09-30 19:45:33
1.8K0
修改2022-09-30 19:45:33
举报
文章被收录于专栏:Windows技术交流Windows技术交流

https://superuser.com/questions/1252565/how-to-get-primary-harddisk-serial-number-only

代码语言:javascript
复制
wmic process get ExecutablePath,ProcessId,Description,ParentProcessId,ReadOperationCount,WriteOperationCount,ThreadCount /format:table
wmic process get ExecutablePath,ProcessId,Description,ParentProcessId,ReadOperationCount,WriteOperationCount,ThreadCount /format:list

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc738752(v=ws.10)

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc758713(v=ws.10)

wmic partition where(DeviceID="Disk #0, Partition #0") list brief /format:list

wmic partition where(DeviceID="Disk #0, Partition #0") list full /format:list

wmic diskdrive where index=0 list full /format:list|findstr Partitions

wmic volume where "driveletter='C:'" list full /format:list

wmic OS get LastBootUpTime

//查看系统上次启动的时间

wmic os get LocalDateTime

//获取当前精确时间

wmic process where name='mspaint.exe' call terminate

//根据进程名结束进程

下面这个也是结束进程的命令,但是看到delete有点不太敢执行

wmic process where name='mspaint.exe' delete 顾名思义好像是删除文件,其实是删除进程,进程对应的文件还是存在的,例如

wmic process where name='SubnetAbacus.exe' delete

wmic process where name='httpd.exe' get executablepath,processid,threadcount

//根据进程名确定进程路径、进程号、线程数

wmic process where name='httpd.exe' get executablepath,processid,threadcount | find /i "httpd.exe" /c

//统计同名进程数

wmic DESKTOPMONITOR where Status='ok' get ScreenHeight,ScreenWidth

//确定屏幕分辨率 (云服务器本身没有实体屏幕,无法获取到,普通电脑可以)

wmic logicaldisk where "drivetype=3" get name

//确定磁盘分区情况

wmic logicaldisk where "drivetype=3" get name,filesystem,freespace

//确定磁盘分区情况包括分区名、文件系统、剩余空间

wmic os get captial

wmic os get version

wmic os get caption,version

wmic os get caption,version,buildnumber /format:list

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云服务器
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档