Skip to content

tandyx/pwsh-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

custom powershell profile

custom powershell profile with some useful functions and aliases for my personal use. on github for easy access and sharing across work and school computers.

adopted from Tim Sneath https://gist.github.com/timsneath/19867b12eee7fd5af2ba

screenshot

you may want to add -NoLogo to any instance of powershell.exe

installation

create a powershell profile by entering this directly into powershell, and then you could just do what you want with this profile.ps1 file:

  1. open powershell and enter:

    if (!(Test-Path $PROFILE.CurrentUserAllHosts)) {
        New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force 
    }
  2. open the file with:

    notepad $PROFILE.CurrentUserAllHosts

    OR:

    Invoke-Item $PROFILE.CurrentUserAllHosts

commands

  • Edit-Profile - opens the profile file (you may need to make .ps1 files open with your preferred text editor by default)
  • Admin or sudo - runs the following command as administrator, or opens a new powershell window as administrator if no command is given
  • Get-IP - gets the public IP address of the current machine
  • whereis - finds the location of a file on path
  • Update-Drivers, Update-Windows, Update-All - updates drivers, windows, or both + winget apps

About

my custom powershell profile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published