Useful PowerShell functions and scripts
- Open your powershell profile
notepad $profile
- Append the following lines to your PowerShell Profile
Get-ChildItem "C:\{path\to}\powershell-utils\functions" | ForEach-Object { . $_.FullName }
- Save profile and restart your powershell terminal
Deletes local git branches that have been deleted from the remote git repository. This should be run from inside a git repo directory.
Prune-LocalGitBranches
Recursively delete node_modules
folders under a directory. Optionally takes root path as an argument defaults to the current working directory.
Remove-NodeModules
Remove-NodeModules "C:\dev\repos\my-repo"