Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MateuszNad/c1955f11f4d8b1d25e761795c3fde506 to your computer and use it in GitHub Desktop.
Save MateuszNad/c1955f11f4d8b1d25e761795c3fde506 to your computer and use it in GitHub Desktop.
# PowerShell 7 - &&
ping 8.8.8.8 && Write-Output "Host found"
# Example 2
New-Item -Path (Join-Path $pwd -ChildPath 'file.txt') -Value "test" && Get-Content -Path(Join-Path $pwd -ChildPath 'file.txt')
# PowerShell 7 - ||
ping powershell.io || Write-Output "Host not found"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment