powershell 常用命令之取磁盘分区信息

//查看mac 地址
PS C:\Users\yyy> get-wmiobject -class Win32_NetworkAdapterConfiguration -namespace "root\cimv2" | select ServiceName,ipadress,MacAddress

ServiceName  ipadress MacAddress
-----------  -------- ----------
kdnic
e1dexpress
rtux64w10
tunnel
tunnel
RasSstp
RasAgileVpn
Rasl2tp
PptpMiniport
RasPppoe
NdisWan               B6:EB:20:52:41:53
NdisWan               BA:AC:20:52:41:53
NdisWan               BA:C3:20:52:41:53
tunnel
kmloop
tunnel
Netwtw04              EA:6A:56:C6:51:6B
vwifimp               00:28:F8:B2:A9:4F
RFCOMM
BthPan                00:28:F8:B2:A9:52
VMnetAdapter          00:50:56:C0:00:01
VMnetAdapter          00:50:56:C0:00:08
tunnel

 

 

 

PS C:\Users\yyy> Get-CimInstance Win32_Process | select ProcessId,name,CommandLine

ProcessId name CommandLine
--------- ---- -----------
0 System Idle Process
4 System
392 smss.exe
9764 TIM.exe                    "C:\Program Files (x86)\Tencent\TIM\Bin\TIM.exe" /hosthwnd=200188 /hostname=QQ_IPC_{E19D6CD2-94DA-4777-8F39-A86E3376947C} /memoryid=0 "C:\Program Files (x86)\Tencent\TIM\Bin\TIM.exe"
5160 TXPlatform.exe             "C:\Program Files (x86)\Tencent\TIM\Bin\TXPlatform.exe" -Embedding
3432 powershell.exe             "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
7084 conhost.exe                \??\C:\Windows\system32\conhost.exe 0x4

 

 

PS C:\Users\yyy> Get-WmiObject -Class Win32_LogicalDisk | select *
PS C:\Users\yyy> Get-WmiObject -Class Win32_LogicalDisk | select deviceid,size,freespace

deviceid         size   freespace
--------         ----   ---------
C:       209121701888 17412263936
D:       290391584768 37319020544

 

PS C:\Users\yyy> Get-WMIObject  Win32_ComputerSystem| select *
PS C:\Users\yyy> Get-WMIObject  Win32_ComputerSystem| select name,domain

name            domain
----            ------
DESKTOP-G2Q1KTA WORKGROUP
//取系统信息 版本号
PS C:\Users\yyy> Get-CimInstance Win32_OperatingSystem | select caption,version,codeset caption version codeset ------- ------- ------- Microsoft Windows 10 专业版 10.0.14393 936

 

转载于:https://www.cnblogs.com/hjbf/p/10774381.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值