<string[]> -like <wildcard-expression> <string[]> -notlike <wildcard-expression> <string[]> -match <regular-expression> <string[]> -notmatch <regular-expression> 當這些運算子的輸入是純量值時,它們會傳回 布爾 值。當輸入是值的集合時,集合中的每個項目都會轉換成字串以進行比較。 -...
Sort-Object 对每个属性使用 Compare 方法。 如果属性未实现 IComparable,则 cmdlet 会将属性值转换为字符串,并使用 Compare 方法System.String。 有关详细信息,请参阅 PSObject.CompareTo(Object) 方法。 如果对枚举属性(如 状态)进行排序,Sort-Object 按枚举值排序。 对于 Windows 服务,“已停止” 的值...
string[] Split(Params char[] separator) string[] Split(char[] separator, int count) string[] Split(char[] separator, System.StringSplitOptions options) string[] Split(char[] separator, int count, System.StringSplitOptions options) string[] Split(string[] separator, System.StringSplitOptions options...
The-matchand-cmatchoperators, which compare a string to a regular expression. PowerShell also contains many operators that reverse the logic of the comparison, such as-notlikeand-notin. You can make comparisons directly at the command prompt, which returns either True or Fa...
The case insensitive compare(-ieq) and the regular compare operator(-eq) returned True in both the cases. But the case sensitive(-ceq) compare returned False. This case insensitive or sensitive kind of operators are applicable only for Strings and Characters. The numeric values don’t have any...
CommandType Instance property (read-only) Implementation defined Should compare equal with "Application". Definition Instance property (read-only) string A description of the application. Extension Instance property (read-write) string The extension of the application file. Module Instance property (read...
Select-Object[-InputObject <PSObject>] [[-Property] <Object[]>] [-ExcludeProperty <String[]>] [-ExpandProperty <String>] [-Unique] [-CaseInsensitive] [-Last <Int32>] [-First <Int32>] [-Skip <Int32>] [-Wait] [<CommonParameters>] ...
Select-Object [-InputObject <PSObject>] [[-Property] <Object[]>] [-ExcludeProperty <String[]>] [-ExpandProperty <String>] [-Unique] [-CaseInsensitive] [-Last <Int32>] [-First <Int32>] [-Skip <Int32>] [-Wait] [<CommonParameters>]Power...
PowerShell’s logical and comparison operators let you compare pieces of data or test data for some condition. An operator either compares two pieces of data (abinaryoperator) or tests one piece of data (aunaryoperator). All comparison operators are binary operators (they compare two pieces of ...
public string Parameter1; [Parameter(Mandatory = true, ValueFromPipeline = true)] public string InputObject; protected override void ProcessRecord() { if ( Parameter1 != null ) { WriteObject(Parameter1 + ":" + InputObject); } else { ...