Add-FunctionToPSConfigFile

SYNOPSIS

Creates Shortcuts (Functions) to commands or script blocks

SYNTAX

Add-FunctionToPSConfigFile [[-FunctionName] <String>] [[-CommandToRun] <String>] [-Force] [<CommonParameters>]

DESCRIPTION

Creates Shortcuts (Functions) to commands or script blocks

EXAMPLES

EXAMPLE 1

Add-FunctionToPSConfigFile -FunctionName psml -CommandToRun "import-module .\*.psm1 -force -verbose"

PARAMETERS

-FunctionName

Name to use for the command

Type: String
Parameter Sets: (All)
Aliases:

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

-CommandToRun

Command to run in a string format

Type: String
Parameter Sets: (All)
Aliases:

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

-Force

Will delete the config file before saving the new one. If false, then the config file will be renamed.

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, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES