Skip to content

Commit

Permalink
Fixes #6 ampersand in node names (#12)
Browse files Browse the repository at this point in the history
* Updated README

* Use XElement constructor to enable proper parsing of ampersands (#11)
  • Loading branch information
brettmillerb authored Oct 26, 2019
1 parent 34956da commit 60d9519
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion RDCManager/RdcManager.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'RDCManager.psm1'

# Version number of this module.
ModuleVersion = '2.1.0'
ModuleVersion = '2.1.1'

# Supported PSEditions
CompatiblePSEditions = 'Desktop', 'Core'
Expand Down
11 changes: 5 additions & 6 deletions RDCManager/public/DSL/RdcGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ function RdcGroup {
throw ('{0} must be nested in RdcDocument or RdcGroup: {1}' -f $myinvocation.InvocationName, $_.Exception.Message)
}

$xElement = $currentNode = [System.Xml.Linq.XElement]('
<group>
<properties>
<name>{0}</name>
</properties>
</group>' -f $Name)
$xElement = $currentNode = [System.Xml.Linq.XElement]::new('group',
[System.Xml.Linq.XElement]::new('properties',
[System.Xml.Linq.XElement]::new('name', $Name)
)
)

if ($parentNode -is [System.Xml.Linq.XDocument]) {
$parentNode.Element('Rdc').Element('file').Add($xElement)
Expand Down
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ RdcDocument MyServers {
#### Output
![RDCManBasicOutput](/RDCManager/img/ZMRivZa5sA.png)


### Generating a file with specific Active Directory filtering
```powershell
RdcDocument MyServers {
Expand Down Expand Up @@ -91,4 +90,4 @@ Enables scaling of the connected client window.
RdcRemoteDesktopSetting @{
SameSizeAsClientArea = $true
}
```
```

0 comments on commit 60d9519

Please sign in to comment.