Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlServerDsc.Common: Replace Import-SQLPSModule with Import-SqlDscPreferredModule #1848

Closed
johlju opened this issue Feb 5, 2023 · 0 comments · Fixed by #1862
Closed

SqlServerDsc.Common: Replace Import-SQLPSModule with Import-SqlDscPreferredModule #1848

johlju opened this issue Feb 5, 2023 · 0 comments · Fixed by #1862
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@johlju
Copy link
Member

johlju commented Feb 5, 2023

We should remove this function:

function Import-SQLPSModule
{
[CmdletBinding()]
param
(
[Parameter()]
[System.Management.Automation.SwitchParameter]
$Force
)
Import-SqlDscPreferredModule @PSBoundParameters
}

and replace it with the command Import-SqlDscPreferredModule, but since that command is run when the module SqlServerDsc is imported, maybe we can just make sure the module SqlServerDsc is in the session for MOF-resources.

Should be determained case-by-case what action should be taken.

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub labels Feb 5, 2023
@johlju johlju changed the title SqlServerDsc.Common: Replace ´Import-SQLPSModule with Import-SqlDscPreferredModule` SqlServerDsc.Common: Replace Import-SQLPSModule with Import-SqlDscPreferredModule Feb 5, 2023
johlju added a commit that referenced this issue Mar 4, 2023
- SqlServerDsc
  - The private function `Import-SQLPSModule` was replaced throughout with
    the public command `Import-SqlDscPreferredModule` (issue #1848).
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant