Skip to content

Initialize-PSEnvironmentConfiguration

SYNOPSIS

Initialize configuration your PowerShell environment and git.

SYNTAX

Initialize-PSEnvironmentConfiguration [[-Name] <String>] [[-Email] <String>] [[-CentralProfile] <String>]
 [[-Font] <String>] [[-Packages] <String[]>] [-SkipPackages] [-PickPackages] [[-Modules] <String[]>]
 [-SkipModules] [-PickModules] [<CommonParameters>]

DESCRIPTION

Install supporting packages, configure git, and set your console font with this function.

EXAMPLES

EXAMPLE 1

Initialize the PowerShell working environment with a custom font, and set my name and email address for Git commits.

Initialize-PSEnvironmentConfiguration -Name 'Sam Erde' -Email '[email protected]' -ConsoleFont 'FiraCode Nerd Font'

PARAMETERS

-Name

Your name to be used for git commits.

Type: String
Parameter Sets: (All)
Aliases:

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

-Email

Your email to be used for git commits.

Type: String
Parameter Sets: (All)
Aliases:

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

-CentralProfile

The file path to your central PowerShell profile.

Type: String
Parameter Sets: (All)
Aliases:

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

-Font

The font to use for your consoles (PowerShell, Windows PowerShell, git bash, etc.)

Type: String
Parameter Sets: (All)
Aliases:

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

-Packages

Packages to install with winget.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: @('Microsoft.PowerShell', 'Microsoft.WindowsTerminal', 'git.git', 'JanDeDobbeleer.OhMyPosh')
Accept pipeline input: False
Accept wildcard characters: False

-SkipPackages

Option to skip installation of default packages.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PickPackages

Choose which packages you want to install.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Modules

PowerShell modules to install.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: @('CompletionPredictor', 'Microsoft.PowerShell.ConsoleGuiTools', 'Microsoft.PowerShell.PSResourceGet', 'posh-git', 'PowerShellForGitHub', 'Terminal-Icons')
Accept pipeline input: False
Accept wildcard characters: False

-SkipModules

Option to skip installation of default modules.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PickModules

Choose which modules you want to install.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

OUTPUTS

NOTES

To Do Create basic starter profile if none exist Create dot-sourced profile Create interactive picker for packages and modules (separate functions) Bootstrap Out-GridView or Out-ConsoleGridView