PowerShell Helper scripts to manage PowerShell current user profiles.
- 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
- 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
Create current user profile for PowerShell if it does not exist
Create Profile
Add-Profile
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\"
Reload current user profile for PowerShell after modifying in imported modules/scripts or in profile
Update Profile
Update-Profile
Create current user NuGet profile for PowerShell if it does not exist
Create NuGet Profile
Add-NuGetProfile
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\"
Reload current user NuGet profile for PowerShell after modifying in imported modules/scripts or in NuGet profile
Update Profile
Update-NuGetProfile