Resources
  • Introduction
  • ASP.NET
    • F#
    • C#
    • .NET Core
    • MSBuild
    • Tools
  • (T-)SQL
    • Snippets
  • Typescript
  • Javascript
    • Angular
    • React - Redux
    • Stats
  • Progressive Web Apps
  • Design and UX
    • HTML
    • CSS - Cascading Style Sheets
  • Computer Science
    • Architecture and Patterns
    • Database
  • Security
  • Testing
  • Hacking and Tinkering
  • Tools
  • CLI Cheat Sheets
    • Git
    • Dotnet core
    • Docker for Windows
    • Powershell
  • Progressive Web Apps
  • Miscellaneous
Powered by GitBook
On this page

Was this helpful?

  1. CLI Cheat Sheets

Powershell

PreviousDocker for WindowsNextProgressive Web Apps

Last updated 5 years ago

Was this helpful?

> Get-ChildItem -Filter “*current*” -Recurse | Rename-Item -NewName {$_.name -replace ‘current’,’old’ }

Listen to new lines in a log fil containing a specific regex:

> Get-Content .\application_2017-05-30.log -Wait -Tail 0 | Select-String '.+(UserRepository).+'

Run first line only of a script:

> Get-Content <script> -First 1 | Invoke-Expression
Rename files in bulk: