diff --git a/src/System.Management.Automation/engine/InternalCommands.cs b/src/System.Management.Automation/engine/InternalCommands.cs
index 63e4c063f..ea04bee40 100644
--- a/src/System.Management.Automation/engine/InternalCommands.cs
+++ b/src/System.Management.Automation/engine/InternalCommands.cs
@@ -813,6 +813,7 @@ namespace Microsoft.PowerShell.Commands
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "CaseSensitiveNotInSet")]
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "IsSet")]
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "IsNotSet")]
+ [Parameter(Mandatory = true, Position = 0, ParameterSetName = "Not")]
[ValidateNotNullOrEmpty]
public string Property
{
@@ -1199,6 +1200,16 @@ namespace Microsoft.PowerShell.Commands
get { return _binaryOperator == TokenKind.IsNot; }
}
+ ///
+ /// Binary operator -Not.
+ ///
+ [Parameter(Mandatory = true, ParameterSetName = "Not")]
+ public SwitchParameter Not
+ {
+ set { _binaryOperator = TokenKind.Not; }
+ get { return _binaryOperator == TokenKind.Not; }
+ }
+
#endregion binary operator parameters
private readonly CallSite> _toBoolSite =
@@ -1211,6 +1222,16 @@ namespace Microsoft.PowerShell.Commands
return (x, y) => site.Target.Invoke(site, x, y);
}
+ private static Func