Code Monkey home page Code Monkey logo

profilehelper's Introduction

Profile Helpers

PowerShell Helper scripts to manage PowerShell current user profiles.

Getting Started

  • Copy the files
  • Open Command Line or PowerShell (Window + X, A)
  • If you opened Command Prompt, then type powershell in order to use PowerShell commands
  • Navigate to the scripts directory
    cd your_directory
  • Type
    Import-Module .\ProfileHelper.psm1
  • Now you can use the methods from your PowerShell session

Adding Script to Profile [Optional]

  • Enable execution policy using PowerShell Admin
    Set-ExecutionPolicy Unrestricted
  • Navigate to the profile path
    cd (Split-Path -parent $PROFILE)
  • Open the location in Explorer
    ii .
  • Create the user profile if it does not exist
    If (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
  • Import the module in the PowerShell profile
    Import-Module -Path script_directory -ErrorAction SilentlyContinue

Examples

Add-Profile Example

Create current user profile for PowerShell if it does not exist

Create Profile

Add-Profile

Import-Profile Example

Import 1 or more modules/scripts to current user PowerShell profile

Import Script to Profile

Import-Profile -Path "C:\git\PowerShell\ProfileHelpers.psm1"

Import Multiple Scripts to Profile

Import-Profile -Path "C:\git\PowerShell\"

Update-Profile Example

Reload current user profile for PowerShell after modifying in imported modules/scripts or in profile

Update Profile

Update-Profile

Add-NuGetProfile Example

Create current user NuGet profile for PowerShell if it does not exist

Create NuGet Profile

Add-NuGetProfile

Import-NuGetProfile Example

Import 1 or more modules/scripts to current user PowerShell NuGet profile

Import Script to NuGet Profile

Import-NuGetProfile -Path "C:\git\PowerShell\ProfileHelpers.psm1"

Import Multiple Scripts to Profile

Import-NuGetProfile -Path "C:\git\PowerShell\"

Update-Profile Example

Reload current user NuGet profile for PowerShell after modifying in imported modules/scripts or in NuGet profile

Update Profile

Update-NuGetProfile

profilehelper's People

Contributors

jhonnyelhelou91 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.