-
Notifications
You must be signed in to change notification settings - Fork 27
Update to RemoteDesktopServicesDsc #247
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,11 +6,11 @@ configuration RemoteDesktopDeployment | |
| [string] | ||
| $ConnectionBroker, | ||
|
|
||
| [Parameter()] | ||
| [Parameter(Mandatory = $true)] | ||
| [string] | ||
| $WebAccess, | ||
|
|
||
| [Parameter()] | ||
| [Parameter(Mandatory = $true)] | ||
| [string[]] | ||
| $SessionHosts, | ||
|
Comment on lines
+9
to
15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This silently changes the public contract. Line 9 and Line 13 make 🧰 Tools🪛 PSScriptAnalyzer (1.24.0)[error] 9-9: Unexpected attribute 'Parameter'. (UnexpectedAttribute) [error] 13-13: Unexpected attribute 'Parameter'. (UnexpectedAttribute) 🤖 Prompt for AI Agents |
||
|
|
||
|
|
@@ -19,20 +19,19 @@ configuration RemoteDesktopDeployment | |
| $Gateways | ||
| ) | ||
|
|
||
| Import-DscResource -ModuleName xRemoteDesktopSessionHost | ||
| Import-DscResource -ModuleName RemoteDesktopServicesDsc | ||
|
|
||
|
|
||
| xRDSessionDeployment RDS | ||
| RDSessionDeployment RDS | ||
| { | ||
| ConnectionBroker = $ConnectionBroker | ||
| WebAccessServer = $WebAccess | ||
| SessionHost = $SessionHosts | ||
| } | ||
|
|
||
| foreach ($gateway in $Gateways) | ||
| { | ||
| $executionName = "rdsgw_$($gateway.GatewayServer -replace '[().:\s]', '')" | ||
| # foreach ($gateway in $Gateways) | ||
| # { | ||
| # $executionName = "rdsgw_$($gateway.GatewayServer -replace '[().:\s]', '')" | ||
|
|
||
| (Get-DscSplattedResource -ResourceName xRDSessionDeployment -ExecutionName $executionName -Properties $gateway -NoInvoke).Invoke($gateway) | ||
| } | ||
| # (Get-DscSplattedResource -ResourceName xRDSessionDeployment -ExecutionName $executionName -Properties $gateway -NoInvoke).Invoke($gateway) | ||
| # } | ||
| } | ||
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.
Behavior contract changed to implicit SQL defaults without coverage
Line 16 and Line 20 make
SqlServer/DatabaseNameoptional, which now allows silent fallback to'localhost'/'DSC'. That is a meaningful behavior change and can mis-target deployments if callers omit either value. Current config asset coverage still supplies both values, so this path is untested.Please either (a) keep these parameters required, or (b) add unit/config tests that intentionally omit them and assert the default behavior is expected.
As per coding guidelines: “Add unit tests for all commands/functions/resources”.
🧰 Tools
🪛 PSScriptAnalyzer (1.24.0)
[error] 16-16: Unexpected attribute 'Parameter'.
(UnexpectedAttribute)
[error] 20-20: Unexpected attribute 'Parameter'.
(UnexpectedAttribute)
🤖 Prompt for AI Agents