-
Notifications
You must be signed in to change notification settings - Fork 33
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
Documentation #4
Comments
Well, since I didn't get any reply I had to dig a bit and figure out how the resources worked. And this is my configuration example script that changes the setting I asked for in my previous post but also another, more complex, setting (with multiple values). Configuration LocalGPO
{
param
(
[string[]] $NodeName = 'localhost'
)
Import-DSCResource -ModuleName PolicyFileEditor
Node $NodeName
{
cAdministrativeTemplateSetting RDPLicensing
{
KeyValueName = "SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\LicenseServers"
PolicyType = "Machine"
Data = ("server.test.localgpo.dsc.com")
Ensure = "Present"
Type = "String"
}
## The next 3 resources are to change the GPO Setting "Set Remote Desktop Services User Home Directory"
cAdministrativeTemplateSetting "RDP Users Home Directory Path"
{
# SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services!WFHomeDirUNC
# SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services!WFHomeDir
# SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services!WFHomeDirDrive
KeyValueName = "SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\WFHomeDir"
PolicyType = "Machine"
Data = "\\servershare\test"
Ensure = "Present"
Type = "String"
}
cAdministrativeTemplateSetting "RDP Users Home Directory Letter"
{
KeyValueName = "SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\WFHomeDirDrive"
PolicyType = "Machine"
Data = "X:"
Ensure = "Present"
Type = "String"
}
cAdministrativeTemplateSetting "RDP Users Home Directory UNC boolean"
{
KeyValueName = "SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\WFHomeDirUNC"
PolicyType = "Machine"
Data = "1"
Ensure = "Present"
Type = "Dword"
}
}
}
LocalGPO
Start-DscConfiguration -Path .\LocalGPO -Wait -Force -Verbose Another IMPORTANT note: in order to view the changes in the GPO editor (gpedit.msc) you must run the command |
Wow. You posted two days ago, while I was out of town. It's not like you're paying for support here; have patience. |
Hi @dlwyatt , I know it's not support ;) I would love to use the module properly, and documentation makes it easier. |
That spreadsheet is handy; I've never seen it before. Normally I just look in the template files found under C:\Windows\PolicyDefinitions. The text that you'll see in the GUI can be found in the
So now I open TerminalServer.admx and search for TS_LICENSE_SERVERS, and find this:
|
In this example, I'd have a hard time guessing whether that was supposed to be a String or MultiString value, so I'd probably just set the policy through the GUI and then go look at that spot in the registry to see what it did. |
Yes, in the case of multiple parameters that was precisely what I did. Will you be able to update the README with some examples of usage? |
Is it possible to provide some documentation and examples?
I want to use the DSC Resource , but is not that easy to understand how to use it (even after checking
Get-DscResource -Syntax cAccountAdministrativeTemplateSetting
)I would like to change some setting in
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Session Host\Licensing
. How do I do this?The text was updated successfully, but these errors were encountered: