Set-EPREnvironment
SYNOPSIS
Sets a number of new variables in the script scope.
SYNTAX
1 2 |
|
DESCRIPTION
By running this function in the beginning of your script the following variables will be made available:
- epr_Directory
- epr_logsDirectory
- epr_scriptsDirectory
- epr_scriptSettingsDirectory
- epr_scriptHelpersDirectory
- epr_modulesDirectory
- epr_customModulesDirectory
- epr_customFunctionsDirectory
- ScriptLogName
- LoggerSettings
EXAMPLES
EXAMPLE 1
1 |
|
EXAMPLE 2
1 |
|
In this example we want to get the old variable names along with the new names.
EXAMPLE 3
1 |
|
In this example we also import the modules 'MyModule' and 'AnotherModule' located in the directory [NameOfEPRInstall]/scripts/helpers/customModules.
EXAMPLE 4
1 |
|
In this example we also import the modules 'MyOfficialModule' and 'AnotherModuleAsAnExample' located in the directory [NameOfEPRInstall]/scripts/helpers/modules.
PARAMETERS
-CustomModules
Name of modules to import from [NameOfEPRInstall]/scripts/helpers/customModules
1 2 3 4 5 6 7 8 9 |
|
-IncludeOldVariableNames
Specifies if the old variable names should be set in the script scope.
1 2 3 4 5 6 7 8 9 |
|
-Modules
Name of modules to import from [NameOfEPRInstall]/scripts/helpers/modules
1 2 3 4 5 6 7 8 9 |
|
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.
The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break.
1 2 3 4 5 6 7 8 9 |
|
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.