语法格式:(Get-Item 文件按目录) | Get-Member 获取注册表项目的内容 首先打开注册表,找到蓝牙的注册表进行测试对比 输出结果: 获取文件目增加过滤条件 三、常用参数说明 -Path:参数指定项目的路径,支持通配符。 -Path参数是必需的。可以使用.指定当前目录。 如果需要指定当前位置中的所有项目,可以使用*。 -Include...
Get-Item Get-ItemProperty Get-ItemPropertyValue Get-Location Get-Process Get-PSDrive Get-PSProvider Get-Service Get-TimeZone Invoke-Item Join-Path Move-Item Move-ItemProperty New-Item New-ItemProperty New-PSDrive New-Service Pop-Location Push-Location ...
最简单的方法是获取与某个项相关联的属性名称。 例如,若要查看注册表项HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion中的条目名称,请使用Get-Item。 注册表项有一个通用名称为“Property”的属性,它是项中的注册表条目列表。 以下命令选择 Property 属性并扩展这些项,以便它们可在列表中显示: ...
New-Item ("HKCR:\$keyname\shell\myexecute2") -value '执行完关闭' -type String New-Item ("HKCR:\$keyname\shell\myexecute2\command") -value "$psExe-Command`"& '%L'`"" -type String New-Item ("HKCR:\$keyname\shell\myeditnotepad") -value '记事本编辑' -type String New-Item ("...
使用Select-Object选择需要的属性,例如:Select-Object DeviceID, FreeSpace, Size。 4. 示例 powershellCopy Code # 获取操作系统信息Get-WmiObject-ClassWin32_OperatingSystem# 获取网络适配器信息Get-WmiObject-ClassWin32_NetworkAdapterConfiguration |Where-Object{$_.IPAddress-ne$null}# 获取逻辑磁盘信息Get-WmiObj...
FTPItem1.7.1.1PSFTPAlias Receive-FTPItem1.7.1.1PSFTPAlias Send-FTPItem1.7.1.1PSFTPFunction Add-FTPItem1.7.1.1PSFTPFunction Get-FTPChildItem1.7.1.1PSFTPFunction Get-FTPConnection1.7.1.1PSFTPFunction Get-FTPItem1.7.1.1PSFTPFunction Get-FTPItemSize1.7.1.1PSFTPFunction New-FTPItem1.7.1.1PSFTPFunction Remove...
Get-MailboxStatistics "Tamara Johnston" | Format-List StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount 页面顶部 查看所有邮箱的大小和配额状态 下面的命令将检索所有邮箱的以下信息: 邮箱的显示名称 邮箱的配额状态 舍入为两个小数位的以 MB 为单位的邮箱大小 ...
Add completion single/double quote support for -PSEdition parameter for Get-Module (#24971) (Thanks @ArmaanMcleod!) Error when New-Item -Force is passed an invalid directory name (#24936) (Thanks @kborowinski!) Allow Start-Transcriptto use $Transcript which is a PSObject wrapped string to ...
functionGet-CmdletAlias($cmdletName) {Get-Alias|Where-Object-FilterScript{$_.Definition-like"$cmdletName"} |Format-Table-PropertyDefinition, Name-AutoSize} 自定义主机 PowerShell functionCustomizeConsole {$hostTime= (Get-ChildItem-Path$PSHOME\pwsh.exe).CreationTime$hostVersion="$($Host.Version.Majo...
Get-ProcessExplorer |Select-Object-PropertyProcessName-ExpandPropertyModules |Format-ListProcessName : explorer ModuleName : explorer.exe FileName : C:\WINDOWS\explorer.exe BaseAddress :140697278152704ModuleMemorySize :3919872EntryPointAddress :140697278841168FileVersionInfo : File: C:\WINDOWS\explorer.exe Int...