还可以使用 Select-Object 和Format-List cmdlet 显示对象的属性值。 Select-Object 和Format-List 各有一个 Property 参数。 可以使用 Property 参数指定一个或多个属性及其值。 也可以使用通配符 (*) 来表示所有属性。 例如,以下命令显示 pwsh.exe 文件的所有属性的值。 PowerShell 复制 Get-ChildItem $PSHOME...
在PowerShell 6.1 中,Get-Module -ListAvailable已更新其格式化程序以显示每个模块的版本兼容性: powerShell Get-Module-ListAvailable Output Directory: C:\Users\me\Documents\PowerShell\Modules ModuleType Version Name PSEdition ExportedCommands --- --- --- --- --- Script 1.4.0 Az Core,D...
默认情况下,所有模块的LogPipelineExecutionDetails属性设置为$False。 若要为模块启用模块日志记录,请使用以下命令格式。 模块必须导入到会话中,并且设置仅在当前会话中有效。 PowerShell复制 Import-Module<Module-Name> (Get-Module<Module-Name>).LogPipelineExecutionDetails =$true 若要为特定计算机上的所有会话...
The properties of the class correspond to the parameters available when using the cmdlet.The noun portion of the cmdlet name allows you to differentiate your custom cmdlet from other cmdlets. The noun part specifies the resources upon which the cmdlet acts. Ideally, the noun used in cmdlet ...
“数据”部分是 PowerShell 2.0 的一项功能。 没有修订,包含数据部分的脚本将无法在 PowerShell 1.0 中运行。 语法 Data 节的语法如下所示: DATA [<variable-name>] [-supportedCommand <cmdlet-name>] { <Permitted content> } 需要数据关键字 (keyword) 。 此名称不区分大小写。 允许的内容仅限于以下元素...
Move-ItemProperty : The input object can't be bound to any parameters for the command either because the command doesn't take pipeline input or the input and its properties do not match any of the parameters that take pipeline input. At line:1 char:23 + $a | Move-ItemProperty <<< -Pa...
You can use the following values: AutoSuspended Completed CompletedWithWarning CompletionInProgress Failed InProgress Queued Retrying Suspended You can't use this parameter with the Identity parameter. Expand table Type: RequestStatus Position: Named Default value: None Required: False Accept pipeline ...
When you run the Get-ExchangeServer cmdlet with no parameters, it returns the attributes of all the servers in the Exchange organization. To return specific server properties (including domain controller information) where the Get-ExchangeServer cmdlet has to contact servers directly or perform a com...
Percent signs in the invocation message represent structured ETW properties. While they are replaced with the actual values in the message text, a more robust way to access them is to retrieve the message with the Get-WinEvent cmdlet, and then use the Properties array of the message. Here’...
Over-ride some default parameter values Update the Format enumeration limit Set the ‘home’ directory to a non-standard location Create personal aliases Create a PowerShell credential object These are all things that make the environment customized to your liking. I use some personal aliases as al...