public: property System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ FilterScript { System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ get(); void set(System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ value);...
与管道配合工作的函数与过滤器看起来相似,尽管函数的process块语义等同于过滤器,但是函数在内部以FunctionInfo对象存在;而过滤器以FilterInfo对象存在。下例中的函数会过滤掉管道中所有的奇数,只保留偶数:展开表 PS C:\> function Even-Function>> {>> process>...
public: property System::Management::Automation::ScriptBlock ^ FilterScript { System::Management::Automation::ScriptBlock ^ get(); void set(System::Management::Automation::ScriptBlock ^ value); }; Property Value ScriptBlock Applies to 產品版本 PowerShell SDK 7.2.0, 7.3.0...
public: property System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ FilterScript { System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ get(); void set(System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ value);...
public: property System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ FilterScript { System::Activities::InArgument<System::Management::Automation::ScriptBlock ^> ^ get(); void set(System::Activities::InArgument<System::Management::Automation::ScriptBlock ...
$data|Group-Object Name|select Name,Count,@{n="TotalVM";e={($_.Group|Measure-Object-PropertyVM-Sum).Sum}} Filter过滤 过滤相当于SLQ中的Where语句,在PowerShell中使用Where-Object命令。可以简写为Where,甚至可以简写为”?”。在普通程序里面我们遇到的比较运算和逻辑运算在PowerShell中有所不同,是这样的...
(以GB为单位) Get-WmiObject win32_logicaldisk -Filter "deviceID='c:'" | Select-Object -Property __Server,@{n 'FreeGB ';e={$_.Freespace /1Gb -as [int]}} | Format-Table -AutoSize __SERVER FreeGB --- --- 08DC1 21 其中用于构造显示属性,第一个为__Server,第二个是自定义的FreeGB...
Set-Acl [-Path] <String[]> [-AclObject] <Object> [-ClearCentralAccessPolicy] [-PassThru] [-Filter <String>] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] PowerShell Copy Set-Acl [-InputObject] <PSObject> [-AclObject] <Object> [-Pass...
要代替使用 WHERE 语句的备用方法是使用 -filter 参数,后者使用与 WHERE 语句相同的语法,并可以生成相同的结果。不过,-filter 参数是在服务器上运行。如果使用管道将 Get-SPContentDatabase cmdlet 的结果输送到 WHERE 语句,将导致 SQL 往返于 Windows PowerShell 客户端正在运行的位置。使用 -filter 参数可以提高性能...
The Filter parameter uses OPATH syntax to filter the results by the specified properties and values. The search criteria uses the syntax "Property -ComparisonOperator 'Value'". Enclose the whole OPATH filter in double quotation marks " ". If the filter contains system values (for example, $true...