-
Notifications
You must be signed in to change notification settings - Fork 227
Add new public commands #2108
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
Add new public commands #2108
Conversation
Co-authored-by: johlju <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2108 +/- ##
====================================
Coverage 94% 94%
====================================
Files 145 148 +3
Lines 9091 9162 +71
====================================
+ Hits 8617 8686 +69
- Misses 474 476 +2
🚀 New features to boost your workflow:
|
|
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds two new public cmdlets and extends another: Get-SqlDscManagedComputerInstance, Get-SqlDscServerProtocolName, and enhanced Get-SqlDscServerProtocol. Also updates localization strings, unit and integration tests, SMO test stubs, CI pipeline test list, and CHANGELOG entry. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant G as Get-SqlDscManagedComputerInstance
participant M as Get-SqlDscManagedComputer
participant W as SMO WMI (ManagedComputer/ServerInstance)
U->>G: Invoke (ServerName, [InstanceName]) or (ManagedComputerObject, [InstanceName])
alt ByServerName
G->>M: Get-SqlDscManagedComputer -ServerName
M-->>G: ManagedComputerObject
else ByManagedComputerObject
Note over G: Uses provided ManagedComputerObject
end
alt Specific instance
G->>W: ManagedComputerObject.ServerInstances[InstanceName]
alt Found
W-->>G: ServerInstance
G-->>U: ServerInstance
else Not found
G-->>U: Terminating error (SqlServerInstanceNotFound)
end
else All instances
G->>W: Enumerate ManagedComputerObject.ServerInstances
W-->>G: ServerInstance[]
G-->>U: ServerInstance[]
end
sequenceDiagram
autonumber
actor U as User
participant P as Get-SqlDscServerProtocol
participant G as Get-SqlDscManagedComputerInstance
participant N as Get-SqlDscServerProtocolName
participant W as SMO WMI (ServerInstance/ServerProtocol)
U->>P: Invoke via (ServerName,InstanceName[,ProtocolName]) or (ManagedComputerObject,InstanceName[,ProtocolName]) or (ManagedComputerInstanceObject[,ProtocolName])
alt Needs instance resolution
P->>G: Resolve ServerInstance
G-->>P: ServerInstance
else Instance provided
Note over P: Uses ManagedComputerInstanceObject directly
end
alt ProtocolName specified
P->>W: ServerInstance.ServerProtocols[ProtocolName]
alt Found
W-->>P: ServerProtocol
P-->>U: ServerProtocol
else Not found
P-->>U: Terminating error (SqlServerProtocolNotFound)
end
else No ProtocolName
P->>N: Get-SqlDscServerProtocolName -All
N-->>P: [TcpIp, NamedPipes, SharedMemory]
loop For each mapping
P->>W: ServerInstance.ServerProtocols[mapping.Name]
W-->>P: ServerProtocol
end
P-->>U: ServerProtocol[]
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
johlju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot there have be big changes to the instructions for this project, go through all instructions and follow them explicitly.
… existing public commands Co-authored-by: johlju <[email protected]>
…Protocol Co-authored-by: johlju <[email protected]>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
source/Public/Get-SqlDscManagedComputerInstance.ps1 (2)
63-77: Add ValidateNotNull for the pipeline parameter.Prevents null pipeline inputs and improves diagnostics.
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ParameterSetName = 'ByManagedComputerObject')] + [ValidateNotNull()] [Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer] $ManagedComputerObject
118-125: Optional: Stream objects explicitly.Returning the collection is fine (it’s enumerable), but you can stream instances explicitly for clarity.
- return $ManagedComputerObject.ServerInstances + foreach ($instance in $ManagedComputerObject.ServerInstances) + { + $instance + }tests/Unit/Stubs/SMO.cs (1)
1463-1493: Make ServerProtocolCollection enumerable and field readonly.Aligns stub behavior with SMO collections and simplifies foreach usage in tests.
- public class ServerProtocolCollection + public class ServerProtocolCollection : System.Collections.IEnumerable { - // Properties - public System.Int32 Count { get { return protocols.Count; } } + // Properties + public System.Int32 Count { get { return protocols.Count; } } public System.Boolean IsSynchronized { get; set; } public System.Object SyncRoot { get; set; } - // Collection of protocols - private System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerProtocol> protocols = new System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerProtocol>(System.StringComparer.OrdinalIgnoreCase); + // Collection of protocols + private readonly System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerProtocol> protocols = + new System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerProtocol>(System.StringComparer.OrdinalIgnoreCase); // Indexer public Microsoft.SqlServer.Management.Smo.Wmi.ServerProtocol this[string name] { get { if (protocols.ContainsKey(name)) { return protocols[name]; } return null; } set { if (value == null) { protocols.Remove(name); } else { protocols[name] = value; } } } + + // IEnumerable implementation + public System.Collections.IEnumerator GetEnumerator() + { + return protocols.Values.GetEnumerator(); + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
CHANGELOG.md(1 hunks)source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1(1 hunks)source/Public/Get-SqlDscManagedComputerInstance.ps1(1 hunks)source/Public/Get-SqlDscServerProtocol.ps1(1 hunks)source/en-US/SqlServerDsc.strings.psd1(2 hunks)tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1(1 hunks)tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1(1 hunks)tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1(1 hunks)tests/Unit/Public/Get-SqlDscManagedComputerInstance.Tests.ps1(1 hunks)tests/Unit/Public/Get-SqlDscServerProtocol.Tests.ps1(1 hunks)tests/Unit/Stubs/SMO.cs(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1
🚧 Files skipped from review as they are similar to previous changes (7)
- tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1
- source/Public/Get-SqlDscServerProtocol.ps1
- tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1
- tests/Unit/Public/Get-SqlDscServerProtocol.Tests.ps1
- tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1
- tests/Unit/Public/Get-SqlDscManagedComputerInstance.Tests.ps1
- source/en-US/SqlServerDsc.strings.psd1
🧰 Additional context used
📓 Path-based instructions (5)
**
⚙️ CodeRabbit configuration file
**: # DSC Community GuidelinesTerminology
- Command: Public command
- Function: Private function
- Resource: DSC class-based resource
Build & Test Workflow
- Run scripts in
pwsh; always from repository root- Build before running tests:
.\build.ps1 -Tasks build- Always run tests in new PowerShell session:
Invoke-Pester -Path @({test paths}) -Output DetailedFile Organization
- Public commands:
source/Public/{CommandName}.ps1- Private functions:
source/Private/{FunctionName}.ps1- Unit tests:
tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1- Integration tests:
tests/Integration/Commands/{CommandName}.Integration.Tests.ps1Requirements
- Follow instructions over existing code patterns
- Follow PowerShell style and test guideline instructions strictly
- Always update CHANGELOG.md Unreleased section
- Localize all strings using string keys; remove any orphaned string keys
- Check DscResource.Common before creating private functions
- Separate reusable logic into private functions
- DSC resources should always be created as class-based resources
- Add unit tests for all commands/functions/resources
- Add integration tests for all public commands and resources
Files:
CHANGELOG.mdtests/Unit/Stubs/SMO.cssource/Public/Get-SqlDscManagedComputerInstance.ps1
**/*.md
⚙️ CodeRabbit configuration file
**/*.md: # Markdown Style Guidelines
- Wrap lines at word boundaries when over 80 characters (except tables/code blocks)
- Use 2 spaces for indentation
- Use '1.' for all items in ordered lists (1/1/1 numbering style)
- Disable
MD013rule by adding a comment for tables/code blocks exceeding 80 characters- Empty lines required before/after code blocks and headings (except before line 1)
- Escape backslashes in file paths only (not in code blocks)
- Code blocks must specify language identifiers
Text Formatting
- Parameters: bold
- Values/literals:
inline code- Resource/module/product names: italic
- Commands/files/paths:
inline code
Files:
CHANGELOG.md
CHANGELOG.md
⚙️ CodeRabbit configuration file
CHANGELOG.md: # Changelog Guidelines
- Always update the Unreleased section in CHANGELOG.md
- Use Keep a Changelog format
- Describe notable changes briefly, ≤2 items per change type
- Reference issues using format issue #<issue_number>
- No empty lines between list items in same section
- Skip adding entry if same change already exists in Unreleased section
- No duplicate sections or items in Unreleased section
Files:
CHANGELOG.md
**/*.ps?(m|d)1
⚙️ CodeRabbit configuration file
**/*.ps?(m|d)1: # PowerShell GuidelinesNaming
- Use descriptive names (3+ characters, no abbreviations)
- Functions: PascalCase with Verb-Noun format using approved verbs
- Parameters: PascalCase
- Variables: camelCase
- Keywords: lower-case
- Classes: PascalCase
- Include scope for script/global/environment variables:
$script:,$global:,$env:File naming
- Class files:
###.ClassName.ps1format (e.g.001.SqlReason.ps1,004.StartupParameters.ps1)Formatting
Indentation & Spacing
- Use 4 spaces (no tabs)
- One space around operators:
$a = 1 + 2- One space between type and variable:
[String] $name- One space between keyword and parenthesis:
if ($condition)- No spaces on empty lines
- Try to limit lines to 120 characters
Braces
- Newline before opening brace (except variable assignments)
- One newline after opening brace
- Two newlines after closing brace (one if followed by another brace or continuation)
Quotes
- Use single quotes unless variable expansion is needed:
'text'vs"text $variable"Arrays
- Single line:
@('one', 'two', 'three')- Multi-line: each element on separate line with proper indentation
- Do not use the unary comma operator (
,) in return statements to force
an arrayHashtables
- Empty:
@{}- Each property on separate line with proper indentation
- Properties: Use PascalCase
Comments
- Single line:
# Comment(capitalized, on own line)- Multi-line:
<# Comment #>format (opening and closing brackets on own line), and indent text- No commented-out code
Comment-based help
- Always add comment-based help to all functions and scripts
- Comment-based help: SYNOPSIS, DESCRIPTION (40+ chars), PARAMETER, EXAMPLE sections before function/class
- Comment-based help indentation: keywords 4 spaces, text 8 spaces
- Include examples for all parameter sets and combinations
- INPUTS: List each pipeline‑accepted type (one per line) with a 1‑line description.
- OUTPUTS: Lis...
Files:
source/Public/Get-SqlDscManagedComputerInstance.ps1
source/**/*.ps1
⚙️ CodeRabbit configuration file
source/**/*.ps1: # Localization GuidelinesRequirements
- Localize all Write-Debug, Write-Verbose, Write-Error, Write-Warning and $PSCmdlet.ThrowTerminatingError() messages
- Use localized string keys, not hardcoded strings
- Assume
$script:localizedDatais availableString Files
- Commands/functions:
source/en-US/{MyModuleName}.strings.psd1- Class resources:
source/en-US/{ResourceClassName}.strings.psd1Key Naming Patterns
- Format:
Verb_FunctionName_Action(underscore separators), e.g.Get_Database_ConnectingToDatabaseString Format
ConvertFrom-StringData @' KeyName = Message with {0} placeholder. (PREFIX0001) '@String IDs
- Format:
(PREFIX####)- PREFIX: First letter of each word in class or function name (SqlSetup → SS, Get-SqlDscDatabase → GSDD)
- Number: Sequential from 0001
Usage
Write-Verbose -Message ($script:localizedData.KeyName -f $value1)
Files:
source/Public/Get-SqlDscManagedComputerInstance.ps1
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/SqlServerDsc-guidelines.instructions.md:0-0
Timestamp: 2025-08-29T17:20:42.266Z
Learning: Applies to tests/Integration/**/*.ps1 : Use DSCSQLTEST (Database Engine), SSRS (Reporting Services), and PBIRS (Power BI Report Server) instance names in CI integration tests
📚 Learning: 2025-08-29T17:20:51.246Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/dsc-community-style-guidelines-changelog.instructions.md:0-0
Timestamp: 2025-08-29T17:20:51.246Z
Learning: Applies to CHANGELOG.md : Describe notable changes briefly, with no more than 2 items per change type
Applied to files:
CHANGELOG.md
📚 Learning: 2025-08-29T17:20:42.266Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/SqlServerDsc-guidelines.instructions.md:0-0
Timestamp: 2025-08-29T17:20:42.266Z
Learning: Applies to **/*.{ps1,psm1} : Public PowerShell commands must use the naming format Verb-SqlDsc{Noun}
Applied to files:
CHANGELOG.md
📚 Learning: 2025-08-29T17:20:42.266Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/SqlServerDsc-guidelines.instructions.md:0-0
Timestamp: 2025-08-29T17:20:42.266Z
Learning: Applies to tests/Stubs/SMO.cs : Ensure all SMO types used by unit-tested classes/commands are properly stubbed in SMO.cs
Applied to files:
tests/Unit/Stubs/SMO.cs
📚 Learning: 2025-09-12T13:22:48.920Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/dsc-community-style-guidelines-powershell.instructions.md:0-0
Timestamp: 2025-09-12T13:22:48.920Z
Learning: Applies to **/*.{ps1,psm1} : Use declared variables more than once (avoid single-use locals)
Applied to files:
source/Public/Get-SqlDscManagedComputerInstance.ps1
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
- GitHub Check: PSScriptAnalyzer
🔇 Additional comments (5)
CHANGELOG.md (1)
121-131: LGTM: Added entries are concise, in the correct section, and follow style.The three bullets accurately describe the new/updated commands and fit the existing Keep a Changelog structure. No duplicates found in Unreleased.
source/Public/Get-SqlDscManagedComputerInstance.ps1 (3)
1-55: Help section looks solid and matches behavior.Examples, INPUTS/OUTPUTS, and indentation follow guidelines; aligns with parameter sets and return types.
81-88: LGTM: ServerName path.Uses localized verbose and resolves the ManagedComputer via the public command with named parameter.
96-116: LGTM: Specific-instance lookup with proper terminating error.Indexing by name, localized message, ObjectNotFound category, and consistent ErrorId are all correct.
tests/Unit/Stubs/SMO.cs (1)
1522-1561: LGTM: Case-insensitive indexer, accurate Count, and IEnumerable for ServerInstanceCollection.Matches expected SMO semantics and supports name-based lookup plus enumeration in tests.
…t PSCustomObject type
…protocols dictionary readonly
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
tests/Unit/Stubs/SMO.cs (3)
1477-1482: Micro-optimization: avoid double dictionary lookup in indexer getter.Apply:
- if (protocols.ContainsKey(name)) - { - return protocols[name]; - } - return null; + Microsoft.SqlServer.Management.Smo.Wmi.ServerProtocol value; + return protocols.TryGetValue(name, out value) ? value : null;
1529-1568: Make instances dictionary readonly for consistency and intent.Apply:
- private System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerInstance> instances = new System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerInstance>(System.StringComparer.OrdinalIgnoreCase); + private readonly System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerInstance> instances = + new System.Collections.Generic.Dictionary<string, Microsoft.SqlServer.Management.Smo.Wmi.ServerInstance>(System.StringComparer.OrdinalIgnoreCase);
1544-1549: Micro-optimization: use TryGetValue in ServerInstanceCollection getter.Apply:
- if (instances.ContainsKey(name)) - { - return instances[name]; - } - return null; + Microsoft.SqlServer.Management.Smo.Wmi.ServerInstance value; + return instances.TryGetValue(name, out value) ? value : null;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1(1 hunks)tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1(1 hunks)tests/Unit/Stubs/SMO.cs(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1
- tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
**: # DSC Community GuidelinesTerminology
- Command: Public command
- Function: Private function
- Resource: DSC class-based resource
Build & Test Workflow
- Run scripts in
pwsh; always from repository root- Build before running tests:
.\build.ps1 -Tasks build- Always run tests in new PowerShell session:
Invoke-Pester -Path @({test paths}) -Output DetailedFile Organization
- Public commands:
source/Public/{CommandName}.ps1- Private functions:
source/Private/{FunctionName}.ps1- Unit tests:
tests/Unit/{Classes|Public|Private}/{Name}.Tests.ps1- Integration tests:
tests/Integration/Commands/{CommandName}.Integration.Tests.ps1Requirements
- Follow instructions over existing code patterns
- Follow PowerShell style and test guideline instructions strictly
- Always update CHANGELOG.md Unreleased section
- Localize all strings using string keys; remove any orphaned string keys
- Check DscResource.Common before creating private functions
- Separate reusable logic into private functions
- DSC resources should always be created as class-based resources
- Add unit tests for all commands/functions/resources
- Add integration tests for all public commands and resources
Files:
tests/Unit/Stubs/SMO.cs
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/SqlServerDsc-guidelines.instructions.md:0-0
Timestamp: 2025-08-29T17:20:42.266Z
Learning: Applies to tests/Integration/**/*.ps1 : Use DSCSQLTEST (Database Engine), SSRS (Reporting Services), and PBIRS (Power BI Report Server) instance names in CI integration tests
📚 Learning: 2025-08-29T17:20:42.266Z
Learnt from: CR
PR: dsccommunity/SqlServerDsc#0
File: .github/instructions/SqlServerDsc-guidelines.instructions.md:0-0
Timestamp: 2025-08-29T17:20:42.266Z
Learning: Applies to tests/Stubs/SMO.cs : Ensure all SMO types used by unit-tested classes/commands are properly stubbed in SMO.cs
Applied to files:
tests/Unit/Stubs/SMO.cs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: dsccommunity.SqlServerDsc (Build Package Module)
- GitHub Check: PSScriptAnalyzer
🔇 Additional comments (1)
tests/Unit/Stubs/SMO.cs (1)
1461-1501: Great alignment with prior feedback on ServerProtocolCollection.Count is read-only, keys are case-insensitive, null setter removes entries, and enumeration returns values. Matches SMO-like semantics and unblocks tests.
…ion 'Stop' to critical commands and setting default value for ServerName if not provided.
…restore the previous value directly after invocation without try-catch-finally.
johlju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johlju reviewed 3 of 6 files at r2, 2 of 12 files at r6, 3 of 13 files at r7, 10 of 10 files at r8, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @copilot)
source/Public/Get-SqlDscServerProtocol.ps1 line 130 at r8 (raw file):
'ByServerName' { $serverInstance = Get-SqlDscManagedComputerInstance -ServerName $ServerName -InstanceName $InstanceName
Need to call ErrorAction.
Code quote:
$serverInstance = Get-SqlDscManagedComputerInstance -ServerName $ServerName -InstanceName $InstanceNamesource/Public/Get-SqlDscServerProtocol.ps1 line 135 at r8 (raw file):
'ByManagedComputerObject' { $serverInstance = $ManagedComputerObject | Get-SqlDscManagedComputerInstance -InstanceName $InstanceName
Need to call ErrorAction.
Code quote:
$serverInstance = $ManagedComputerObject | Get-SqlDscManagedComputerInstance -InstanceName $InstanceName
johlju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johlju reviewed 2 of 10 files at r9, all commit messages.
Reviewable status: 11 of 19 files reviewed, 4 unresolved discussions (waiting on @copilot)
source/Public/Get-SqlDscServerProtocol.ps1 line 130 at r8 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Need to call ErrorAction.
Done
source/Public/Get-SqlDscServerProtocol.ps1 line 135 at r8 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Need to call ErrorAction.
Done
johlju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johlju reviewed 8 of 10 files at r9.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @copilot)
Changes Made
New Public Commands
Technical Improvements
Backward Compatibility
✅ No breaking changes - All existing functionality continues to work unchanged
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is