About 32,000 results
Open links in new tab
  1. How to output something in PowerShell - Stack Overflow

    Jan 11, 2010 · In effect, but very unfortunately, both Windows PowerShell and PowerShell Core as of v7.2, send all of their 6(!) output streams to stdout when called from the outside, via PowerShell's …

  2. Can I get "&&" or "-and" to work in PowerShell? - Stack Overflow

    Quick Tip: With Powershell if you need to use the where command for the same result as you get in CMD, you can't just use where, you need to use where.exe (with the extension), because without …

  3. Multiple -and -or in PowerShell Where-Object statement

    By wrapping your comparisons in {} in your first example you are creating ScriptBlocks; so the PowerShell interpreter views it as Where-Object { <ScriptBlock> -and <ScriptBlock> }. Since the …

  4. How to use Powershell Where-Object like an IN statement

    8kb, gentle nudge, but I think it would be worth accepting Andreas Covidiot's answer as it uses the actual -in operator in powershell – KyleMit ♦ Commented Oct 5, 2021 at 12:14

  5. Ternary operator in PowerShell - Stack Overflow

    Jul 10, 2015 · @Lamarth - That works because the $() wrapper forces evaluation of the statement as an expression, thus returning either the true value of the false value, much like a ternary operator …

  6. PowerShell inline If (IIf) - Stack Overflow

    Sep 5, 2014 · PowerShell 7.0 introduced a new syntax using the ternary operator. It follows the C# ternary operator syntax: The ternary operator behaves like the simplified if-else statement.

  7. PowerShell 'Or' Statement - Stack Overflow

    Jun 23, 2016 · The operator is -or, not or.See about_Logical_Operators.Also, if statements don't read from the pipeline. Either put the if statement in a ForEach-Object loop:

  8. Adding multiple -and and -or statements in WHERE clause in …

    Jun 14, 2019 · I'm currently using Powershell, and i'm trying to sort data in my variable that i'm pulling from another system. At the moment i'm trying to use one -and statement and -or statements after …

  9. How do I negate a condition in PowerShell? - Stack Overflow

    How do I negate a conditional test in PowerShell? For example, if I want to check for the directory C ...

  10. powershell - How to enter a multi-line command - Stack Overflow

    Jul 13, 2010 · In Windows PowerShell as well as PowerShell 7+ (Core), you can use backticks ` to split your command across multiple lines. This makes the command more readable and easier to …

Refresh