日期:2014-05-17 浏览次数:20748 次
#Author:pako
#Email:zealzpc@gmail.com
主要使用Get-WmiObject 命令,Get-WmiObject只用方法 见http://technet.microsoft.com/en-us/library/ee176860.aspx
?
??Get-WmiObject [-类] <string> [[-Property] <string[]>] [-Authority <string>] [-DirectRead] [-Filter <string>] [-Amended] [-AsJob] [-Authentication {<Default> | <None> | <Connect> | <Call> | <Packet> | <PacketIntegrity> | <PacketPrivacy> | <Unchanged>}] [-ComputerName <string[]>] [-Credential <PSCredential>] [-EnableAllPrivileges] [-Impersonation {<Default> | <Anonymous> | <Identify> | <Impersonate> | <Delegate>}] [-Locale <string>] [-命名空间 <string>] [-ThrottleLimit <int>] [<CommonParameters>]
?
?
简单点说就是?Get-WmiObject 后面跟类名 和属性
?
事例:
查看总内存数
Get-WmiObject win32_OperatingSystem TotalVisibleMemorySize
?
?
查看剩余内存数
Get-WmiObject win32_OperatingSystem FreePhysicalMemory
?
查看cpu信息
Get-WmiObject win32_Processor
查看所有分区信息
Get-WmiObject win32_logicaldisk
?
WmiObject??的列表
http://msdn.microsoft.com/en-us/library/aa394084(v=vs.85).aspx
#Author:pako
#Email:zealzpc@gmail.com
?
?