-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new examples for the DSC resources in this module (#74)
- Loading branch information
1 parent
c4a183e
commit b97c82b
Showing
14 changed files
with
177 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,3 @@ class MSFT_xRDServer : OMI_BaseResource | |
|
||
[write] string GatewayExternalFqdn; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -398,4 +398,3 @@ function Test-TargetResource | |
} | ||
|
||
Export-ModuleMember -Function *-TargetResource | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
source/Examples/Resources/xRDGatewayConfiguration/1-CreateGatewayConfiguration.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to ensure that the Remote Desktop Gateway is setup. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDGatewayConfiguration MyGateway { | ||
ConnectionBroker = 'connectionbroker.server.fqdn' | ||
GatewayServer = 'gateway.server.fqdn' | ||
GatewayMode = 'Automatic' | ||
ExternalFqdn = 'gateway.external.fqdn' | ||
LogonMethod = 'AllowUserToSelectDuringConnection' | ||
UseCachedCredentials = $false | ||
BypassLocal = $false | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
source/Examples/Resources/xRDLicenseConfiguration/1-CreateLicenseServer.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to ensure that the Remote Desktop Licensing is setup in the correct mode. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
|
||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDLicenseConfiguration MyLicenseServer { | ||
ConnectionBroker = 'connectionbroker.server.fqdn' | ||
LicenseMode = 'PerUser' | ||
LicenseServer = 'license.server.fqdn' | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
source/Examples/Resources/xRDRemoteApp/1-CreateRemoteApp.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to ensure deploy PowerShell as a RemoteApp. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
|
||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDRemoteApp 'Notepad' { | ||
Alias = 'PowerShell without Profile' | ||
CollectionName = 'BD_Python_Apps' | ||
CommandLineSetting = 'Require' | ||
DisplayName = 'PowerShell' | ||
FilePath = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' | ||
FolderName = '' | ||
IconPath = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' | ||
RequiredCommandLine = '-noprofile' | ||
ShowInWebAccess = $True | ||
UserGroups = '' | ||
FileVirtualPath = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to join a RDSH host to a deployment. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
|
||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDServer RemoteDesktopSessionHost { | ||
ConnectionBroker = 'connectionbroker.server.fqdn' | ||
Server = 'sessionhost.server.fqdn' | ||
Role = 'RDS-RD-Server' | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
source/Examples/Resources/xRDSessionCollection/1-CreateSessionCollection.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to ensure a session collection is created. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDSessionCollection 'MyCollection' { | ||
CollectionName = 'ExampleApplications' | ||
SessionHost = 'sessionhost.server.fqdn' | ||
ConnectionBroker = 'connectionbroker.server.fqdn' | ||
CollectionDescription = 'A collection to deploy example applications' | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
source/Examples/Resources/xRDSessionCollectionConfiguration/1-ConfigureSessionCollection.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to ensure a session collection is configured. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDSessionCollectionConfiguration 'ExampleApplications' { | ||
CollectionName = 'ExampleApplications' | ||
CollectionDescription = 'A collection to deploy example applications' | ||
ConnectionBroker = 'connectionbroker.server.fqdn' | ||
UserGroup = 'DOMAIN\AllowedUsersGroup' | ||
ActiveSessionLimitMin = 0 | ||
BrokenConnectionAction = 'Disconnect' | ||
AutomaticReconnectionEnabled = $True | ||
DisconnectedSessionLimitMin = 30 | ||
IdleSessionLimitMin = 1440 # One day | ||
TemporaryFoldersDeletedOnExit = $True | ||
RDEasyPrintDriverEnabled = 0 | ||
MaxRedirectedMonitors = 16 | ||
ClientPrinterRedirected = 0 | ||
ClientDeviceRedirectionOptions = 'AudioVideoPlayBack, AudioRecording, Clipboard' | ||
ClientPrinterAsDefault = 0 | ||
AuthenticateUsingNLA = $True | ||
EncryptionLevel = 'High' | ||
SecurityLayer = 'SSL' | ||
EnableUserProfileDisk = $True | ||
DiskPath = '\\file.server.fqdn\RDSProfileShare' | ||
MaxUserProfileDiskSizeGB = 5 | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
source/Examples/Resources/xRDSessionDeployment/1-CreateSessionDeployment.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to ensure a session deployment is created. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
Import-DscResource -ModuleName 'xRemoteDesktopSessionHost' | ||
|
||
Node localhost { | ||
|
||
xRDSessionDeployment RDSDeployment { | ||
SessionHost = 'rdsessionhost.server.fqdn' | ||
ConnectionBroker = 'connectionbroker.server.fqdn' | ||
WebAccessServer = 'webaccess.server.fqdn' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,4 +124,3 @@ PrivateData = @{ | |
# DefaultCommandPrefix = '' | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,10 +68,3 @@ | |
|
||
} # End of PrivateData hashtable | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
File renamed without changes.