Closed johlju closed 8 months ago
This will help reduce code in the module SqlServerDsc's command Import-SqlDscPreferredModule
.
Dependent on issue #103 .
This can work if we add a new parameter set with the only parameters FromTarget
and ToTarget
, and keep the existing parameters as the default parameters set. Need to avoid a breaking change.
Suggest adding logic to the command
Set-PSModulePath
so that it is easy to set the sessionPSModulePath
to the same paths as Machine and User target has.Suggest adding a new parameter set parameter
FromTarget
(mutually exclusive to parameterMachine
) with the typeString[]
that has a validate set ofSession
,User
,Machine
. It passes that parameter to a commandGet-PSModulePath
that returns the concatenated paths (separated with semi-colon) depending on what targets was passed to the parameter. Multiple targets should be able to be passed.