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

SqlRS: Tests report Script Analyzer warnings that need to be fixed #264

Closed
johlju opened this issue Dec 28, 2016 · 0 comments · Fixed by #988
Closed

SqlRS: Tests report Script Analyzer warnings that need to be fixed #264

johlju opened this issue Dec 28, 2016 · 0 comments · Fixed by #988
Assignees
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Dec 28, 2016

Details of the scenario you try and problem that is occurring:
Tests report Script Analyzer warnings that need to be fixed:

MSFT_xSQLServerRSConfig.psm1 (Line 37): File 'MSFT_xSQLServerRSConfig.psm1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
MSFT_xSQLServerRSConfig.psm1 (Line 122): File 'MSFT_xSQLServerRSConfig.psm1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
MSFT_xSQLServerRSConfig.psm1 (Line 123): File 'MSFT_xSQLServerRSConfig.psm1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
MSFT_xSQLServerRSConfig.psm1 (Line 138): File 'MSFT_xSQLServerRSConfig.psm1' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.
MSFT_xSQLServerRSConfig.psm1 (Line 173): '($SQLCmdLocation.Name)' has non-constant members. Invoking non-constant members may cause bugs in the script.
MSFT_xSQLServerRSConfig.psm1 (Line 175): '($SQLCmdLocation.Name)' has non-constant members. Invoking non-constant members may cause bugs in the script.

The DSC configuration that is using the resource (as detailed as possible):
n/a

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a

Version of the DSC module you're using, or 'dev' if you're using current dev branch:
dev

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Dec 28, 2016
@johlju johlju changed the title xSQLServerRSConfig: Tests report Script Analyzer warnings that need to be fixed SqlRS: Tests report Script Analyzer warnings that need to be fixed Dec 24, 2017
@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Dec 30, 2017
johlju added a commit to johlju/SqlServerDsc that referenced this issue Dec 30, 2017
- Replaced Get-WmiObject with Get-CimInstance to fix Script Analyzer warnings (issue dsccommunity#264).
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 1, 2018
- Replaced Get-WmiObject with Get-CimInstance to fix Script Analyzer warnings (issue dsccommunity#264).
johlju added a commit that referenced this issue Jan 1, 2018
- Changes to SqlRS
  - Replaced Get-WmiObject with Get-CimInstance to fix Script Analyzer warnings (issue #264).
  - Refactored the resource to use Invoke-CimMethod.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant