Skip to content

Latest commit

 

History

History
92 lines (64 loc) · 2.48 KB

Add-ModuleToProfile.md

File metadata and controls

92 lines (64 loc) · 2.48 KB
external help file Module Name online version schema
PowerBolt-help.xml
PowerBolt
2.0.0

Add-ModuleToProfile

SYNOPSIS

Appends content of the PowerShell session's profile with an Import-Module statement.

SYNTAX

Add-ModuleToProfile [[-Path] <String>] [[-ProfilePath] <String>] [<CommonParameters>]

DESCRIPTION

Appends content of $PROFILE file (or content of ProfilePath parameter if is used) with an Import-Module statement that imports the module found with Path.

EXAMPLES

Example 1

PS C:\> Get-Content $PROFILE
Import-Module C:\Users\Alice\Documents\PowerShell\Modules\posh-git\0.7.1\posh-git.psd1

PS C:\> Add-ModuleToProfile -Path C:\Users\Alice\PowerSploit
PS C:\> Get-Content $PROFILE
Import-Module C:\Users\Alice\Documents\PowerShell\Modules\posh-git\0.7.1\posh-git.psd1
Import-Module C:\Users\Alice\PowerSploit

PS C:\>

The module found in PowerSploit folder will have an Import-Module statement added to the default profile ($PROFILE) item.

PARAMETERS

-Path

Path to module folder.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfilePath

$PROFILE is default profile value.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: $(Get-Variable Profile -ValueOnly)
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

None

OUTPUTS

System.String

NOTES

RELATED LINKS

Add-ModuleToProfile.ps1

Add-ModuleToProfile.Tests.ps1

Skip-ModuleInProfile

Reset-ModuleInProfile