Skip to content

sahil-ag/bashrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Personal Startup File

Windows

Refer - https://sandfeld.net/powershell-load-your-functions-at-startup/

  1. Run if (!(Test-Path (Split-Path $profile))) { mkdir (Split-Path $profile) } ; if (!(Test-Path $profile)) { New-Item $profile -ItemType file } ; notepad $profile in powershell, this will create a default profile, if that doens't exist; and if it does, give you a notepad to set that up

  2. Adding the following snippet

    # Load own custom functions at startup
    $OwnFunctionsDir = "$env:USERPROFILE\Documents\WindowsPowerShell\Functions" # location of windows folder
    Write-Host "Loading custom PowerShell functions from:" -ForegroundColor Green
    Write-Host "$OwnFunctionsDir" -ForegroundColor Yellow
    Get-ChildItem "$OwnFunctionsDir\*.ps1" | %{.$_}
    Write-Host ''

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors