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
上一篇:poj1228 Grandpa's Estate


下一篇:【POJ】1228 Grandpa's Estate(凸包)