$os.OSArchitecture # 获取CPU信息 $cpu = Get-CimInstance -ClassName Win32_Processor $cpuName = $cpu.Name $cpuCores = $cpu.NumberOfCores $cpuLogicalProcessors = $cpu.NumberOfLogicalProcessors # 获取内存信息 $memory = Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property ...
CpuArchitecture Fields NameValueDescription x860 Architecture is Intel x86 MIPs1 Architecture is MIPS Alpha2 Architecture is DEC Alpha PowerPC3 Architecture is Motorolla PowerPC ARM5 Architecture is ARM ia646 Architecture is Itanium-based 64-bit ...
Get-Service | Where-Object {$_.displayName.Contains("Fire")} | Select name,DisplayName //获取服务显示名称里有Fire的服务 Get-FileHash -Path C:\Windows\System32\notepad.exe | Format-List //获取某个文件的Hash值(算法SHA256) Get-WMIObject win32_Processor //获取CPU信息 Get-WmiObject Win32_Vi...
Get-WmiObject Win32_OperatingSystem | Format-List BootDevice,BuildNumber,BuildType,Caption,CodeSet,CountryCode,CreationClassName,CSCreationClassName,CSDVersion,CSName,Description,Locale,Manufacturer,Name,Organization,OSArchitecture,OtherTypeDescription,PlusProductID,PlusVersionNumber,RegisteredUser,SerialNumber,Status...
3、查看CPU的信息 ---PS C:> Get-WmiObject -Class Win32_Processor--- AddressWidth : 32 Architecture : 0 Caption : x86 Family 6 Model 10 Stepping 0 CpuStatus : 1 CreationClassName : Win32_Processor CurrentClockSpeed : 1840 CurrentVoltage : 33...
public: property Nullable<Microsoft::PowerShell::Commands::CpuArchitecture> Architecture { Nullable<Microsoft::PowerShell::Commands::CpuArchitecture> get(); }; Property Value Nullable<CpuArchitecture> Applies to 產品版本 PowerShell SDK7.2.0, 7.3.0, 7.4.0 ...
接着输入Get-Process命令或者ps命令查看当前进程: PSE:\>get-processHandlesNPM(K)PM(K)WS(K)CPU(s)IdSIProcessName---...190122840102880.0326960msdtc43459100276826206.8420040MsMpEng7303961676758162.1920161powershell... 然后输入以下命令创建一个新的进程,并把它设置为隐藏窗口执行,再查看...
Get-Process-Namechrome |Stop-Process 更间接一点,遍历所有拿到的 Process 对象,然后杀掉: 1 Get-Process-Namechrome |Foreach-Object{$_.Kill() } 查询端口 查询端口命令: 1 netstat -ano |findstr "端口号" powershell 压缩和解压 zip 创建zip
(Get-WmiObject -ClassWin32_ComputerSystem).MaxMemory 如果该命令返回为空,可能是由于该系统信息未填充,您可以查看硬件文档或使用其他系统监控工具(如 CPU-Z)来获取最大支持内存的具体数值。 4.查询虚拟内存大小 如果您还想查看虚拟内存(分页文件)相关信息,可以使用以下命令: ...
我们可能首先想到的,也是使用不同的Module中的不同的命令,收集诸如 CPU,内存,磁盘,系统等不同的信息,其实在Powershell中,有两种方法去完成信息收集的过程。 1. 使用 Powershell 提供的 Module 和相关命令:比如我们在前面使用过的Get-Process 获取当前计算机中运行的进程 ...